Add versioning to the new macros

They are available in 2.74.
This commit is contained in:
Emmanuele Bassi 2022-06-29 18:05:16 +01:00
parent c0766caf20
commit c4f9b926d8

View File

@ -288,7 +288,9 @@ void g_flags_complete_type_info (GType g_flags_type,
*
* Since: 2.74
*/
#define G_DEFINE_ENUM_VALUE(EnumValue, EnumNick) { EnumValue, #EnumValue, EnumNick }
#define G_DEFINE_ENUM_VALUE(EnumValue, EnumNick) \
{ EnumValue, #EnumValue, EnumNick } \
GLIB_AVAILABLE_MACRO_IN_2_74
/**
* G_DEFINE_ENUM_TYPE:
@ -326,7 +328,8 @@ type_name ## _get_type (void) { \
g_once_init_leave (&g_define_type__static, g_define_type); \
} \
return g_define_type__static; \
}
} \
GLIB_AVAILABLE_MACRO_IN_2_74
/**
* G_DEFINE_FLAGS_TYPE:
@ -368,7 +371,8 @@ type_name ## _get_type (void) { \
g_once_init_leave (&g_define_type__static, g_define_type); \
} \
return g_define_type__static; \
}
} \
GLIB_AVAILABLE_MACRO_IN_2_74
G_END_DECLS