[json-glib] Make json-gvariant.h conform to the other headers



commit 0d6a2da5775de27160f9fd0bad783cb7d45d8dac
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Wed Dec 4 12:43:37 2013 +0000

    Make json-gvariant.h conform to the other headers
    
    Only include the necessary headers, and use a single-header inclusion
    guard to prevent people from including only json-gvariant.h.

 json-glib/json-gvariant.c |    5 +++++
 json-glib/json-gvariant.h |    7 +++++--
 2 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/json-glib/json-gvariant.c b/json-glib/json-gvariant.c
index 99b2b8f..41b6f43 100644
--- a/json-glib/json-gvariant.c
+++ b/json-glib/json-gvariant.c
@@ -27,8 +27,13 @@
 
 #include <glib/gi18n-lib.h>
 
+#include <gio/gio.h>
+
 #include "json-gvariant.h"
 
+#include "json-generator.h"
+#include "json-parser.h"
+
 /**
  * SECTION:json-gvariant
  * @short_description: Serialize and deserialize GVariant types
diff --git a/json-glib/json-gvariant.h b/json-glib/json-gvariant.h
index 6644b21..8fb54e5 100644
--- a/json-glib/json-gvariant.h
+++ b/json-glib/json-gvariant.h
@@ -24,8 +24,11 @@
 #ifndef __JSON_GVARIANT_H__
 #define __JSON_GVARIANT_H__
 
-#include <glib.h>
-#include <json-glib/json-glib.h>
+#if !defined(__JSON_GLIB_INSIDE__) && !defined(JSON_COMPILATION)
+#error "Only <json-glib/json-glib.h> can be included directly."
+#endif
+
+#include <json-glib/json-types.h>
 
 G_BEGIN_DECLS
 


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