[glib] gsettingsbackend.h: pretend to be gio.h



commit 95c564cabe2837be56f2cf3901a4d6d9d84ab6c9
Author: Ryan Lortie <desrt desrt ca>
Date:   Fri Jun 4 23:02:44 2010 +0200

    gsettingsbackend.h: pretend to be gio.h
    
    Since #include <gsettingsbackend.h> is a perfectly valid thing for
    applications to do, and since we want to include gio headers from
    gsettingsbackend.h, we need to effectively disable the #error we would
    get from those headers (because we're not coming via gio.h).
    
    We don't want to #include <gio/gio.h> here because this would cause
    needless rebuilding of GSettingsBackend, GSettings,
    GDelayedSettingsBackend, etc... every time someone changed anything in
    any public header.

 gio/gsettingsbackend.h |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gio/gsettingsbackend.h b/gio/gsettingsbackend.h
index b454b42..23b9371 100644
--- a/gio/gsettingsbackend.h
+++ b/gio/gsettingsbackend.h
@@ -28,7 +28,9 @@
 #error "You must define G_SETTINGS_ENABLE_BACKEND before including <gio/gsettingsbackend.h>."
 #endif
 
-#include <glib-object.h>
+#define __GIO_GIO_H_INSIDE__
+#include <gio/giotypes.h>
+#undef __GIO_GIO_H_INSIDE__
 
 G_BEGIN_DECLS
 



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