summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorKjell Ahlstedt <kjellahlstedt@gmail.com>2020-08-29 12:00:26 +0200
committerKjell Ahlstedt <kjellahlstedt@gmail.com>2020-08-29 12:00:26 +0200
commit737d68182b2d891541d60a6f0c5d0dec1dc861ac (patch)
treeeecd8445c9fa47572c1be097ac0952723c142379 /tools
parent2da4503d039da6a12cbd61cbbfea0af4ba572229 (diff)
downloadglibmm-737d68182b2d891541d60a6f0c5d0dec1dc861ac.tar.gz
gmmproc: Make h2def.py recognize more macros
When parsing function declarations, remove G_DECLARE_DERIVABLE_TYPE and GDK_DECLARE_INTERNAL_TYPE.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/defs_gen/h2def.py8
1 files 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