diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2013-08-21 12:16:10 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2013-08-21 12:16:48 +0100 |
commit | 5b6ada6b362f3ff160608c00bcffbb8f2b8eff7b (patch) | |
tree | 63100cde96b821d43a07bdcc90c11050fe00fc44 /json-glib/json-parser.c | |
parent | 361e427316cc50b52e4b8f0a71a2b29d1a02ed36 (diff) | |
download | json-glib-5b6ada6b362f3ff160608c00bcffbb8f2b8eff7b.tar.gz |
Remove compile time GLib version check
We depend on a new version of GLib, so we can remove a bunch of old
version checks.
Diffstat (limited to 'json-glib/json-parser.c')
-rw-r--r-- | json-glib/json-parser.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/json-glib/json-parser.c b/json-glib/json-parser.c index 1600e90..fc22eb1 100644 --- a/json-glib/json-parser.c +++ b/json-glib/json-parser.c @@ -45,11 +45,7 @@ #include "json-parser.h" #include "json-scanner.h" -#if GLIB_CHECK_VERSION (2, 37, 3) -# define JSON_PARSER_GET_PRIVATE(obj) ((JsonParserPrivate *) json_parser_get_instance_private ((JsonParser *) (obj))) -#else -# define JSON_PARSER_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), JSON_TYPE_PARSER, JsonParserPrivate)) -#endif +#define JSON_PARSER_GET_PRIVATE(obj) ((JsonParserPrivate *) json_parser_get_instance_private ((JsonParser *) (obj))) struct _JsonParserPrivate { @@ -106,11 +102,7 @@ static guint parser_signals[LAST_SIGNAL] = { 0, }; G_DEFINE_QUARK (json-parser-error-quark, json_parser_error) -#if GLIB_CHECK_VERSION (2, 37, 3) G_DEFINE_TYPE_WITH_PRIVATE (JsonParser, json_parser, G_TYPE_OBJECT) -#else -G_DEFINE_TYPE (JsonParser, json_parser, G_TYPE_OBJECT) -#endif static guint json_parse_array (JsonParser *parser, JsonScanner *scanner, @@ -164,10 +156,6 @@ json_parser_class_init (JsonParserClass *klass) { GObjectClass *gobject_class = G_OBJECT_CLASS (klass); -#if !GLIB_CHECK_VERSION (2, 37, 3) - g_type_class_add_private (klass, sizeof (JsonParserPrivate)); -#endif - gobject_class->dispose = json_parser_dispose; gobject_class->finalize = json_parser_finalize; |