summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2013-12-04 12:41:06 +0000
committerEmmanuele Bassi <ebassi@gnome.org>2013-12-04 12:41:06 +0000
commit0de776ea67869b692ee8bd709fd70c0e2368d9fc (patch)
tree5a9e66aa86a5d97c554e58f29dc8d20d53a72a0d
parentb3072da5a2e897b2b87f84d30485bf316c4476fb (diff)
downloadjson-glib-0de776ea67869b692ee8bd709fd70c0e2368d9fc.tar.gz
Move the single include guard after multiple inclusion one
GCC (and other compilers) can optimise multiple inclusion of headers if they find the: #ifndef FOO #define FOO #endif pattern as the first thing inside a header. The single-header inclusion guard was preventing that from happening, so we need to move it inside the multiple inclusion guard.
-rw-r--r--json-glib/json-builder.h6
-rw-r--r--json-glib/json-enum-types.h.in6
-rw-r--r--json-glib/json-generator.h6
-rw-r--r--json-glib/json-parser.h6
-rw-r--r--json-glib/json-path.h6
-rw-r--r--json-glib/json-reader.h6
-rw-r--r--json-glib/json-types.h6
-rw-r--r--json-glib/json-version.h.in6
8 files changed, 24 insertions, 24 deletions
diff --git a/json-glib/json-builder.h b/json-glib/json-builder.h
index e034193..093f67c 100644
--- a/json-glib/json-builder.h
+++ b/json-glib/json-builder.h
@@ -20,13 +20,13 @@
* Luca Bruno <lethalman88@gmail.com>
*/
+#ifndef __JSON_BUILDER_H__
+#define __JSON_BUILDER_H__
+
#if !defined(__JSON_GLIB_INSIDE__) && !defined(JSON_COMPILATION)
#error "Only <json-glib/json-glib.h> can be included directly."
#endif
-#ifndef __JSON_BUILDER_H__
-#define __JSON_BUILDER_H__
-
#include <json-glib/json-types.h>
G_BEGIN_DECLS
diff --git a/json-glib/json-enum-types.h.in b/json-glib/json-enum-types.h.in
index 96f565e..c36e433 100644
--- a/json-glib/json-enum-types.h.in
+++ b/json-glib/json-enum-types.h.in
@@ -1,11 +1,11 @@
/*** BEGIN file-header ***/
+#ifndef __JSON_ENUM_TYPES_H__
+#define __JSON_ENUM_TYPES_H__
+
#if !defined(__JSON_GLIB_INSIDE__) && !defined(JSON_COMPILATION)
#error "Only <json-glib/json-glib.h> can be included directly."
#endif
-#ifndef __JSON_ENUM_TYPES_H__
-#define __JSON_ENUM_TYPES_H__
-
#include <glib-object.h>
G_BEGIN_DECLS
diff --git a/json-glib/json-generator.h b/json-glib/json-generator.h
index eb7cdba..3ce7d08 100644
--- a/json-glib/json-generator.h
+++ b/json-glib/json-generator.h
@@ -21,13 +21,13 @@
* Emmanuele Bassi <ebassi@linux.intel.com>
*/
+#ifndef __JSON_GENERATOR_H__
+#define __JSON_GENERATOR_H__
+
#if !defined(__JSON_GLIB_INSIDE__) && !defined(JSON_COMPILATION)
#error "Only <json-glib/json-glib.h> can be included directly."
#endif
-#ifndef __JSON_GENERATOR_H__
-#define __JSON_GENERATOR_H__
-
#include <json-glib/json-types.h>
#include <gio/gio.h>
diff --git a/json-glib/json-parser.h b/json-glib/json-parser.h
index 894a80b..9988915 100644
--- a/json-glib/json-parser.h
+++ b/json-glib/json-parser.h
@@ -21,13 +21,13 @@
* Emmanuele Bassi <ebassi@linux.intel.com>
*/
+#ifndef __JSON_PARSER_H__
+#define __JSON_PARSER_H__
+
#if !defined(__JSON_GLIB_INSIDE__) && !defined(JSON_COMPILATION)
#error "Only <json-glib/json-glib.h> can be included directly."
#endif
-#ifndef __JSON_PARSER_H__
-#define __JSON_PARSER_H__
-
#include <glib-object.h>
#include <gio/gio.h>
#include <json-glib/json-types.h>
diff --git a/json-glib/json-path.h b/json-glib/json-path.h
index 2bae608..6a30932 100644
--- a/json-glib/json-path.h
+++ b/json-glib/json-path.h
@@ -20,13 +20,13 @@
* Emmanuele Bassi <ebassi@linux.intel.com>
*/
+#ifndef __JSON_PATH_H__
+#define __JSON_PATH_H__
+
#if !defined(__JSON_GLIB_INSIDE__) && !defined(JSON_COMPILATION)
#error "Only <json-glib/json-glib.h> can be included directly."
#endif
-#ifndef __JSON_PATH_H__
-#define __JSON_PATH_H__
-
#include <json-glib/json-types.h>
G_BEGIN_DECLS
diff --git a/json-glib/json-reader.h b/json-glib/json-reader.h
index 6ee0b54..14c7cad 100644
--- a/json-glib/json-reader.h
+++ b/json-glib/json-reader.h
@@ -20,13 +20,13 @@
* Emmanuele Bassi <ebassi@linux.intel.com>
*/
+#ifndef __JSON_READER_H__
+#define __JSON_READER_H__
+
#if !defined(__JSON_GLIB_INSIDE__) && !defined(JSON_COMPILATION)
#error "Only <json-glib/json-glib.h> can be included directly."
#endif
-#ifndef __JSON_READER_H__
-#define __JSON_READER_H__
-
#include <json-glib/json-types.h>
G_BEGIN_DECLS
diff --git a/json-glib/json-types.h b/json-glib/json-types.h
index 3f7ff52..366d0df 100644
--- a/json-glib/json-types.h
+++ b/json-glib/json-types.h
@@ -21,13 +21,13 @@
* Emmanuele Bassi <ebassi@linux.intel.com>
*/
+#ifndef __JSON_TYPES_H__
+#define __JSON_TYPES_H__
+
#if !defined(__JSON_GLIB_INSIDE__) && !defined(JSON_COMPILATION)
#error "Only <json-glib/json-glib.h> can be included directly."
#endif
-#ifndef __JSON_TYPES_H__
-#define __JSON_TYPES_H__
-
#include <glib-object.h>
G_BEGIN_DECLS
diff --git a/json-glib/json-version.h.in b/json-glib/json-version.h.in
index bc05f1b..c46ff49 100644
--- a/json-glib/json-version.h.in
+++ b/json-glib/json-version.h.in
@@ -21,13 +21,13 @@
* Emmanuele Bassi <ebassi@linux.intel.com>
*/
+#ifndef __JSON_VERSION_H__
+#define __JSON_VERSION_H__
+
#if !defined(__JSON_GLIB_INSIDE__) && !defined(JSON_COMPILATION)
#error "Only <json-glib/json-glib.h> can be included directly."
#endif
-#ifndef __JSON_VERSION_H__
-#define __JSON_VERSION_H__
-
/**
* SECTION:json-version
* @short_description: JSON-GLib version checking