summaryrefslogtreecommitdiff
path: root/json-glib/json-types.h
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@linux.intel.com>2011-10-17 10:52:43 +0100
committerEmmanuele Bassi <ebassi@linux.intel.com>2011-10-17 10:56:41 +0100
commitc2429c07107edd6acf95e80b82d968771c669c35 (patch)
tree3390fd1ef0cd3223c1272d041483b02d820f5c16 /json-glib/json-types.h
parentf0dad4508b63359123926f699a66aead9c782ce1 (diff)
downloadjson-glib-c2429c07107edd6acf95e80b82d968771c669c35.tar.gz
Use the new GLib deprecation scheme
Instead of using a defined symbol to remove the deprecated functions from the library, we should use compiler warnings.
Diffstat (limited to 'json-glib/json-types.h')
-rw-r--r--json-glib/json-types.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/json-glib/json-types.h b/json-glib/json-types.h
index ecbf198..8bb583b 100644
--- a/json-glib/json-types.h
+++ b/json-glib/json-types.h
@@ -32,6 +32,20 @@
G_BEGIN_DECLS
+/* guards to avoid bumping up the GLib dependency */
+#ifndef G_DEPRECATED
+#define G_DEPRECATED G_GNUC_DEPRECATED
+#define G_DEPRECATED_FOR(x) G_GNUC_DEPRECATED_FOR(x)
+#endif
+
+#ifdef JSON_DISABLE_DEPRECATION_WARNINGS
+#define JSON_DEPRECATED
+#define JSON_DEPRECATED_FOR(x)
+#else
+#define JSON_DEPRECATED G_DEPRECATED
+#define JSON_DEPRECATED_FOR(x) G_DEPRECATED_FOR(x)
+#endif
+
/**
* JSON_NODE_TYPE:
* @node: a #JsonNode
@@ -226,10 +240,11 @@ JsonObject * json_object_ref (JsonObject *object);
void json_object_unref (JsonObject *object);
#ifndef JSON_DISABLE_DEPRECATED
+JSON_DEPRECATED_FOR(json_object_set_member)
void json_object_add_member (JsonObject *object,
const gchar *member_name,
- JsonNode *node) G_GNUC_DEPRECATED;
-#endif /* JSON_DISABLE_DEPRECATED */
+ JsonNode *node);
+#endif
void json_object_set_member (JsonObject *object,
const gchar *member_name,