Explain magic literals in G_VARIANT_*_INIT

This commit is contained in:
Alexander Klauer 2022-03-04 11:29:58 +00:00 committed by Philip Withnall
parent b109c2a210
commit bc2ca9df20

View File

@ -362,7 +362,14 @@ GQuark g_variant_parse_error_quark (void);
*
* Since: 2.50
*/
#define G_VARIANT_BUILDER_INIT(variant_type) { { { 2942751021u, variant_type, { 0, } } } }
#define G_VARIANT_BUILDER_INIT(variant_type) \
{ \
{ \
{ \
2942751021u /* == GVSB_MAGIC_PARTIAL, see gvariant.c */, variant_type, { 0, } \
} \
} \
}
GLIB_AVAILABLE_IN_ALL
GVariantBuilder * g_variant_builder_new (const GVariantType *type);
@ -478,7 +485,14 @@ struct _GVariantDict {
*
* Since: 2.50
*/
#define G_VARIANT_DICT_INIT(asv) { { { asv, 3488698669u, { 0, } } } }
#define G_VARIANT_DICT_INIT(asv) \
{ \
{ \
{ \
asv, 3488698669u /* == GVSD_MAGIC_PARTIAL, see gvariant.c */, { 0, } \
} \
} \
}
GLIB_AVAILABLE_IN_2_40
GVariantDict * g_variant_dict_new (GVariant *from_asv);