GitLab repository storage has been migrated to hashed layout. Please contact Infrastructure team if you notice any issues with repositories or hooks.

Commit b5e1ea6f authored by Allison Karlitskaya's avatar Allison Karlitskaya

DECLARE_TYPE: ignore deprecations in inlines

Prevent complaints about deprecations in the inline functions emitted by
the new G_DECLARE_*_TYPE macros.
parent 9d0389b3
...@@ -1383,6 +1383,7 @@ guint g_type_get_type_registration_serial (void); ...@@ -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); ...@@ -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); ...@@ -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); ...@@ -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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment