[glib] DECLARE_TYPE: ignore deprecations in inlines
- From: Ryan Lortie <desrt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] DECLARE_TYPE: ignore deprecations in inlines
- Date: Fri, 30 Jan 2015 15:54:10 +0000 (UTC)
commit b5e1ea6fee6ac5b97585ffc1e30eb4f1ec137e1f
Author: Ryan Lortie <desrt desrt ca>
Date: Fri Jan 30 16:40:03 2015 +0100
DECLARE_TYPE: ignore deprecations in inlines
Prevent complaints about deprecations in the inline functions emitted by
the new G_DECLARE_*_TYPE macros.
gobject/gtype.h | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gobject/gtype.h b/gobject/gtype.h
index d055a96..e6fbaf3 100644
--- a/gobject/gtype.h
+++ b/gobject/gtype.h
@@ -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:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]