diff options
author | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2020-08-29 12:00:26 +0200 |
---|---|---|
committer | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2020-08-29 12:00:26 +0200 |
commit | 737d68182b2d891541d60a6f0c5d0dec1dc861ac (patch) | |
tree | eecd8445c9fa47572c1be097ac0952723c142379 /tools | |
parent | 2da4503d039da6a12cbd61cbbfea0af4ba572229 (diff) | |
download | glibmm-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-x | tools/defs_gen/h2def.py | 8 |
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 |