glib GVariant 3
GVariant *value1, *value2, *value3, *value4; value1 = g_variant_new ("y", 200); value2 = g_variant_new ("b", TRUE); value3 = g_variant_new ("d", 37.5); value4 = g_variant_new ("x", G_GINT64_CONSTANT (998877665544332211)); gdouble floating; gboolean truth; gint64 bignum; g_variant_get (value1, "y", NULL); /* ignore the value. */ g_variant_get (value2, "b", &truth); g_variant_get (value3, "d", &floating); g_variant_get (value4, "x", &bignum); g_message ("%d, %f, %d", truth, floating, bignum);