[glibmm] Fix h2def.py not parsing function starting with G_GNUC_* macros.



commit 6d35c0dcd396d47555a7a1e45cb156eca43efded
Author: Krzesimir Nowak <qdlacz gmail com>
Date:   Tue Sep 27 11:16:11 2011 +0200

    Fix h2def.py not parsing function starting with G_GNUC_* macros.
    
    * tools/defs_gen/h2def.py: Strip some G_GNUC_* macros that are known
    to be placed before return type of function prototype.
    Fixes bug #660225.

 ChangeLog               |   12 ++++++++++--
 tools/defs_gen/h2def.py |    5 +++++
 2 files changed, 15 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index ee1eac2..a389561 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2011-09-27  Krzesimir Nowak  <qdlacz gmail com>
+
+	Fix h2def.py not parsing function starting with G_GNUC_* macros.
+
+	* tools/defs_gen/h2def.py: Strip some G_GNUC_* macros that are known
+	to be placed before return type of function prototype.
+	Fixes bug #660225.
+
 2.30.0
 
 2011-09-27  Murray Cumming  <murrayc murrayc com>
@@ -15,8 +23,8 @@
 	* glib/src/gobject_functions.defs:
 	* glib/src/gmodule_functions.defs:
 	* gio/src/gio_functions.defs: Regenerated with h2defs.py, though see 
-  bug #660225 .
-  * glib/src/datetime.hg: Added an m4 conversion that is now necessary.
+	bug #660225 .
+	* glib/src/datetime.hg: Added an m4 conversion that is now necessary.
 
 2011-09-26  Murray Cumming  <murrayc murrayc com>
 
diff --git a/tools/defs_gen/h2def.py b/tools/defs_gen/h2def.py
index 17617fa..f4983b8 100755
--- a/tools/defs_gen/h2def.py
+++ b/tools/defs_gen/h2def.py
@@ -300,6 +300,11 @@ def clean_func(buf):
     pat = re.compile(r"""G_BEGIN_DECLS|BEGIN_LIBGTOP_DECLS""", re.MULTILINE)
     buf = pat.sub('', buf)
 
+    #strip G_GNUC_WARN_UNUSED_RESULT and G_INLINE_FUNC
+    pat = re.compile(r"""G_GNUC_WARN_UNUSED_RESULT|G_INLINE_FUNC""", re.MULTILINE)
+    buf = pat.sub('', buf)
+    #we are not stripping G_GNUC_INTERNAL
+
     #extern "C"
     pat = re.compile(r"""^\s*(extern)\s+\"C\"\s+{""", re.MULTILINE)
     buf = pat.sub('', buf)



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