std: std_gvar_tuple_array/_rational: Fix GVariantBuilder type.
Fix the type of container used to initialize the GVariantBuilder structure which builds an array of tuples.
This commit is contained in:
parent
80d3497569
commit
1bb348cdbf
|
@ -624,7 +624,7 @@ SR_PRIV GVariant *std_gvar_tuple_array(const uint64_t a[][2], unsigned int n)
|
||||||
GVariant *rational[2];
|
GVariant *rational[2];
|
||||||
GVariantBuilder gvb;
|
GVariantBuilder gvb;
|
||||||
|
|
||||||
g_variant_builder_init(&gvb, G_VARIANT_TYPE_ARRAY);
|
g_variant_builder_init(&gvb, G_VARIANT_TYPE_TUPLE);
|
||||||
|
|
||||||
for (i = 0; i < n; i++) {
|
for (i = 0; i < n; i++) {
|
||||||
rational[0] = g_variant_new_uint64(a[i][0]);
|
rational[0] = g_variant_new_uint64(a[i][0]);
|
||||||
|
@ -643,7 +643,7 @@ SR_PRIV GVariant *std_gvar_tuple_rational(const struct sr_rational *r, unsigned
|
||||||
GVariant *rational[2];
|
GVariant *rational[2];
|
||||||
GVariantBuilder gvb;
|
GVariantBuilder gvb;
|
||||||
|
|
||||||
g_variant_builder_init(&gvb, G_VARIANT_TYPE_ARRAY);
|
g_variant_builder_init(&gvb, G_VARIANT_TYPE_TUPLE);
|
||||||
|
|
||||||
for (i = 0; i < n; i++) {
|
for (i = 0; i < n; i++) {
|
||||||
rational[0] = g_variant_new_uint64(r[i].p);
|
rational[0] = g_variant_new_uint64(r[i].p);
|
||||||
|
|
Loading…
Reference in New Issue