mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 11:26:16 +01:00
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:
parent
9d0389b3b5
commit
b5e1ea6fee
@ -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) \
|
||||
GType module_obj_name##_get_type (void); \
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS \
|
||||
typedef struct _##ModuleObjName ModuleObjName; \
|
||||
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); } \
|
||||
static inline gboolean MODULE##_IS_##OBJ_NAME (gpointer ptr) { \
|
||||
return G_TYPE_CHECK_INSTANCE_TYPE (ptr, module_obj_name##_get_type ()); } \
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
/**
|
||||
* 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) \
|
||||
GType module_obj_name##_get_type (void); \
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS \
|
||||
typedef struct _##ModuleObjName ModuleObjName; \
|
||||
typedef struct _##ModuleObjName##Class ModuleObjName##Class; \
|
||||
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 ()); } \
|
||||
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); }
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
/**
|
||||
* G_DEFINE_TYPE:
|
||||
|
Loading…
Reference in New Issue
Block a user