DECLARE_TYPE: ignore deprecations in inlines

Prevent complaints about deprecations in the inline functions emitted by
the new G_DECLARE_*_TYPE macros.
This commit is contained in:
Ryan Lortie 2015-01-30 16:40:03 +01:00
parent 9d0389b3b5
commit b5e1ea6fee

View File

@ -1383,6 +1383,7 @@ guint g_type_get_type_registration_serial (void);
**/ **/
#define G_DECLARE_FINAL_TYPE(ModuleObjName, module_obj_name, MODULE, OBJ_NAME, ParentName) \ #define G_DECLARE_FINAL_TYPE(ModuleObjName, module_obj_name, MODULE, OBJ_NAME, ParentName) \
GType module_obj_name##_get_type (void); \ GType module_obj_name##_get_type (void); \
G_GNUC_BEGIN_IGNORE_DEPRECATIONS \
typedef struct _##ModuleObjName ModuleObjName; \ typedef struct _##ModuleObjName ModuleObjName; \
typedef struct { ParentName##Class parent_class; } ModuleObjName##Class; \ typedef struct { ParentName##Class parent_class; } ModuleObjName##Class; \
\ \
@ -1390,6 +1391,7 @@ guint g_type_get_type_registration_serial (void);
return G_TYPE_CHECK_INSTANCE_CAST (ptr, module_obj_name##_get_type (), ModuleObjName); } \ return G_TYPE_CHECK_INSTANCE_CAST (ptr, module_obj_name##_get_type (), ModuleObjName); } \
static inline gboolean MODULE##_IS_##OBJ_NAME (gpointer ptr) { \ static inline gboolean MODULE##_IS_##OBJ_NAME (gpointer ptr) { \
return G_TYPE_CHECK_INSTANCE_TYPE (ptr, module_obj_name##_get_type ()); } \ return G_TYPE_CHECK_INSTANCE_TYPE (ptr, module_obj_name##_get_type ()); } \
G_GNUC_END_IGNORE_DEPRECATIONS
/** /**
* G_DECLARE_DERIVABLE_TYPE: * G_DECLARE_DERIVABLE_TYPE:
@ -1464,6 +1466,7 @@ guint g_type_get_type_registration_serial (void);
**/ **/
#define G_DECLARE_DERIVABLE_TYPE(ModuleObjName, module_obj_name, MODULE, OBJ_NAME, ParentName) \ #define G_DECLARE_DERIVABLE_TYPE(ModuleObjName, module_obj_name, MODULE, OBJ_NAME, ParentName) \
GType module_obj_name##_get_type (void); \ GType module_obj_name##_get_type (void); \
G_GNUC_BEGIN_IGNORE_DEPRECATIONS \
typedef struct _##ModuleObjName ModuleObjName; \ typedef struct _##ModuleObjName ModuleObjName; \
typedef struct _##ModuleObjName##Class ModuleObjName##Class; \ typedef struct _##ModuleObjName##Class ModuleObjName##Class; \
struct _##ModuleObjName { ParentName parent_instance; }; \ struct _##ModuleObjName { ParentName parent_instance; }; \
@ -1478,6 +1481,7 @@ guint g_type_get_type_registration_serial (void);
return G_TYPE_CHECK_CLASS_TYPE (ptr, module_obj_name##_get_type ()); } \ return G_TYPE_CHECK_CLASS_TYPE (ptr, module_obj_name##_get_type ()); } \
static inline ModuleObjName##Class * MODULE##_##OBJ_NAME##_GET_CLASS (gpointer ptr) { \ static inline ModuleObjName##Class * MODULE##_##OBJ_NAME##_GET_CLASS (gpointer ptr) { \
return G_TYPE_INSTANCE_GET_CLASS (ptr, module_obj_name##_get_type (), ModuleObjName##Class); } return G_TYPE_INSTANCE_GET_CLASS (ptr, module_obj_name##_get_type (), ModuleObjName##Class); }
G_GNUC_END_IGNORE_DEPRECATIONS
/** /**
* G_DEFINE_TYPE: * G_DEFINE_TYPE: