[glib] don't #include <glib.h> from other public headers
- From: Ryan Lortie <ryanl src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [glib] don't #include <glib.h> from other public headers
- Date: Sat, 30 Jan 2010 05:01:37 +0000 (UTC)
commit 1d55cfb51e03f4ba23191df4625ca62d3624652e
Author: Ryan Lortie <desrt desrt ca>
Date: Fri Jan 29 23:56:04 2010 -0500
don't #include <glib.h> from other public headers
fix up some problems that were hidden by that
glib/glib.symbols | 6 ++++--
glib/gtestutils.c | 1 +
glib/gtestutils.h | 6 +++++-
glib/gurifuncs.c | 1 +
glib/gurifuncs.h | 2 +-
glib/gvarianttype.c | 1 +
6 files changed, 13 insertions(+), 4 deletions(-)
---
diff --git a/glib/glib.symbols b/glib/glib.symbols
index ddf7a2e..63b2b7b 100644
--- a/glib/glib.symbols
+++ b/glib/glib.symbols
@@ -1259,8 +1259,6 @@ g_string_vprintf
/* these are not internal, but we don't want to alias them */
g_string_append_c
#endif
-g_str_equal
-g_str_hash
#endif
#endif
@@ -1532,6 +1530,10 @@ g_double_hash
g_direct_equal G_GNUC_CONST
g_direct_hash G_GNUC_CONST
#endif
+#if IN_FILE(__G_STRING_C__)
+g_str_equal
+g_str_hash
+#endif
#endif
#if IN_HEADER(__G_UTILS_H__)
diff --git a/glib/gtestutils.c b/glib/gtestutils.c
index a0bedbd..a6888de 100644
--- a/glib/gtestutils.c
+++ b/glib/gtestutils.c
@@ -19,6 +19,7 @@
*/
#include "config.h"
#include "gtestutils.h"
+#include <glib.h>
#include "galias.h"
#include <sys/types.h>
#ifdef G_OS_UNIX
diff --git a/glib/gtestutils.h b/glib/gtestutils.h
index ac1ed28..18f1ede 100644
--- a/glib/gtestutils.h
+++ b/glib/gtestutils.h
@@ -25,7 +25,11 @@
#ifndef __G_TEST_UTILS_H__
#define __G_TEST_UTILS_H__
-#include <glib.h>
+#include <glib/gmessages.h>
+#include <glib/gstring.h>
+#include <glib/gtypes.h>
+#include <glib/gerror.h>
+#include <glib/gslist.h>
G_BEGIN_DECLS
diff --git a/glib/gurifuncs.c b/glib/gurifuncs.c
index 40f9749..b4180b7 100644
--- a/glib/gurifuncs.c
+++ b/glib/gurifuncs.c
@@ -22,6 +22,7 @@
#include "config.h"
#include "gurifuncs.h"
+#include <glib.h>
#include "string.h"
#include "galias.h"
diff --git a/glib/gurifuncs.h b/glib/gurifuncs.h
index bcdeed9..bbc8f88 100644
--- a/glib/gurifuncs.h
+++ b/glib/gurifuncs.h
@@ -27,7 +27,7 @@
#ifndef __G_URI_FUNCS_H__
#define __G_URI_FUNCS_H__
-#include <glib.h>
+#include <glib/gtypes.h>
G_BEGIN_DECLS
diff --git a/glib/gvarianttype.c b/glib/gvarianttype.c
index 8a773df..6a43fe2 100644
--- a/glib/gvarianttype.c
+++ b/glib/gvarianttype.c
@@ -23,6 +23,7 @@
#include "gvarianttype.h"
#include <glib/gtestutils.h>
+#include <glib/gstrfuncs.h>
#include <string.h>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]