[json-glib] parser: Drop a pointless macro



commit 66aa02b0da6d9964f38c4531f775f7c25b07af7d
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Thu Aug 22 11:46:11 2013 +0100

    parser: Drop a pointless macro
    
    The JSON_PARSER_GET_PRIVATE macro is pointless, now that we use the new
    version of GLib.

 json-glib/json-parser.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/json-glib/json-parser.c b/json-glib/json-parser.c
index fc22eb1..1e8d7c1 100644
--- a/json-glib/json-parser.c
+++ b/json-glib/json-parser.c
@@ -45,8 +45,6 @@
 #include "json-parser.h"
 #include "json-scanner.h"
 
-#define JSON_PARSER_GET_PRIVATE(obj) ((JsonParserPrivate *) json_parser_get_instance_private ((JsonParser *) 
(obj)))
-
 struct _JsonParserPrivate
 {
   JsonNode *root;
@@ -315,9 +313,9 @@ json_parser_class_init (JsonParserClass *klass)
 static void
 json_parser_init (JsonParser *parser)
 {
-  JsonParserPrivate *priv;
+  JsonParserPrivate *priv = json_parser_get_instance_private (parser);
 
-  parser->priv = priv = JSON_PARSER_GET_PRIVATE (parser);
+  parser->priv = priv;
 
   priv->root = NULL;
   priv->current_node = NULL;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]