[glibmm] gmmproc: Make h2def.py recognize more macros



commit 737d68182b2d891541d60a6f0c5d0dec1dc861ac
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date:   Sat Aug 29 12:00:26 2020 +0200

    gmmproc: Make h2def.py recognize more macros
    
    When parsing function declarations, remove G_DECLARE_DERIVABLE_TYPE
    and GDK_DECLARE_INTERNAL_TYPE.

 tools/defs_gen/h2def.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/tools/defs_gen/h2def.py b/tools/defs_gen/h2def.py
index 6417f17f..3201f417 100755
--- a/tools/defs_gen/h2def.py
+++ b/tools/defs_gen/h2def.py
@@ -316,8 +316,12 @@ def clean_func(buf):
     pat = re.compile(r"""([A-Z]+_){1,2}?AVAILABLE_IN_[A-Z_0-9]+""", re.MULTILINE)
     buf = pat.sub('', buf)
 
-    #strip G_DECLARE_FINAL_TYPE (*) and G_DECLARE_INTERFACE (*)
-    pat = re.compile(r"""G_DECLARE_(FINAL_TYPE|INTERFACE)\s*\(.*?\)""", re.MULTILINE)
+    #strip G_DECLARE_FINAL_TYPE (*), G_DECLARE_DERIVABLE_TYPE (*) and G_DECLARE_INTERFACE (*)
+    pat = re.compile(r"""G_DECLARE_(FINAL_TYPE|DERIVABLE_TYPE|INTERFACE)\s*\(.*?\)""", re.MULTILINE)
+    buf = pat.sub('', buf)
+
+    #strip GDK_DECLARE_INTERNAL_TYPE (*)
+    pat = re.compile(r"""GDK_DECLARE_INTERNAL_TYPE\s*\(.*?\)""", re.MULTILINE)
     buf = pat.sub('', buf)
 
     #we are not stripping G_GNUC_INTERNAL


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