[Xfce4-commits] <glib-objc:no-foundation-dep> move _goc_return_*() macros to common/goc-private.h

Brian J. Tarricone noreply at xfce.org
Sun Nov 22 04:02:10 CET 2009


Updating branch refs/heads/no-foundation-dep
         to 29836ebf0aa99e27c66df659d9801153caa8eca2 (commit)
       from b3fa4c2f76cafac7035e99f3dbd809174e97c2bc (commit)

commit 29836ebf0aa99e27c66df659d9801153caa8eca2
Author: Brian J. Tarricone <brian at tarricone.org>
Date:   Tue Jul 7 01:25:53 2009 -0700

    move _goc_return_*() macros to common/goc-private.h
    
    need to add #includes to gobject-objc/ files

 Makefile.am                                        |    1 +
 common/Makefile.am                                 |    2 +
 .../gobject-objc-private.h => common/goc-private.h |   19 ++--------
 configure.ac.in                                    |    1 +
 gobject-objc/gobject-objc-private.h                |   37 --------------------
 5 files changed, 8 insertions(+), 52 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 24b3bbb..02714f1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,5 @@
 SUBDIRS = \
+	common \
 	glib-objc \
 	gobject-objc \
     tests
diff --git a/common/Makefile.am b/common/Makefile.am
new file mode 100644
index 0000000..a18f7db
--- /dev/null
+++ b/common/Makefile.am
@@ -0,0 +1,2 @@
+EXTRA_DIST = \
+	goc-private.h
diff --git a/gobject-objc/gobject-objc-private.h b/common/goc-private.h
similarity index 83%
copy from gobject-objc/gobject-objc-private.h
copy to common/goc-private.h
index 13444e5..ba15d56 100644
--- a/gobject-objc/gobject-objc-private.h
+++ b/common/goc-private.h
@@ -17,12 +17,10 @@
  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 
-#ifndef __GOBJECT_OBJC_PRIVATE_H__
-#define __GOBJECT_OBJC_PRIVATE_H__
+#ifndef __GOC_PRIVATE_H__
+#define __GOC_PRIVATE_H__
 
-#include <glib-object.h>
-
-G_BEGIN_DECLS
+#include <glib.h>
 
 #if defined(__NetBSD__) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
 #define __DBG_FUNC__    __func__
@@ -60,13 +58,4 @@ G_BEGIN_DECLS
     return (val); \
 } G_STMT_END
 
-
-GType _glib_objc_gtype_from_signature(const char *objc_signature);
-#if 0
-BOOL _glib_objc_signatures_match(GType target_gtype,
-                                 const char *objc_signature);
-#endif
-
-G_END_DECLS
-
-#endif  /* __GOBJECT_OBJC_PRIVATE_H__ */
+#endif  /* __GOC_PRIVATE_H__ */
diff --git a/configure.ac.in b/configure.ac.in
index 8078e96..c723d0f 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -94,6 +94,7 @@ AC_MSG_RESULT([$enable_debug])
 
 AC_OUTPUT([
 Makefile
+common/Makefile
 glib-objc/Makefile
 glib-objc/glib-objc-2.0.pc
 gobject-objc/Makefile
diff --git a/gobject-objc/gobject-objc-private.h b/gobject-objc/gobject-objc-private.h
index 13444e5..d39fc94 100644
--- a/gobject-objc/gobject-objc-private.h
+++ b/gobject-objc/gobject-objc-private.h
@@ -24,43 +24,6 @@
 
 G_BEGIN_DECLS
 
-#if defined(__NetBSD__) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
-#define __DBG_FUNC__    __func__
-#elif defined(__GNUC__) && __GNUC__ >= 3
-#define __DBG_FUNC__    __FUNCTION__
-#elif defined(__SVR4) && defined(__sun)
-#define __DBG_FUNC__    __func__
-#else
-#define __DBG_FUNC__    "??"
-#endif
-
-#define _goc_return_if_fail(expr) G_STMT_START{ \
-    if(!(expr)) { \
-        g_warning("%s(): assertion failed: %s", __DBG_FUNC__, \
-                  G_STRINGIFY(expr)); \
-        return; \
-    } \
-}G_STMT_END
-
-#define _goc_return_val_if_fail(expr, val) G_STMT_START{ \
-    if(!(expr)) { \
-        g_warning("%s(): assertion failed: %s", __DBG_FUNC__, \
-                  G_STRINGIFY(expr)); \
-        return (val); \
-    } \
-}G_STMT_END
-
-#define _goc_return_if_reached(msg) G_STMT_START{ \
-    g_warning("%s(): %s", __DBG_FUNC__, msg); \
-    return; \
-} G_STMT_END
-
-#define _goc_return_val_if_reached(msg, val) G_STMT_START{ \
-    g_warning("%s(): %s", __DBG_FUNC__, msg); \
-    return (val); \
-} G_STMT_END
-
-
 GType _glib_objc_gtype_from_signature(const char *objc_signature);
 #if 0
 BOOL _glib_objc_signatures_match(GType target_gtype,



More information about the Xfce4-commits mailing list