summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjell Ahlstedt <kjell.ahlstedt@bredband.net>2016-06-15 10:41:04 +0200
committerKjell Ahlstedt <kjell.ahlstedt@bredband.net>2016-06-15 10:41:04 +0200
commit0b33854c0effe4e300c6350d507982d5ed126e7e (patch)
treeb5871620a10b8f286659cde000c5d36ea2a2e372
parentd14862f6586bcbcb93d95e2f00b10c8e950d5183 (diff)
downloadglibmm-0b33854c0effe4e300c6350d507982d5ed126e7e.tar.gz
gmmproc: Make h2def.py recognize some GDK_PIXBUF macros
gdk-pixbuf has added macros such as GDK_PIXBUF_DEPRECATED* and GDK_PIXBUF_AVAILABLE* in the header files. h2def.py must recognize those macros in order to successfully decode the function declarations.
-rwxr-xr-xtools/defs_gen/h2def.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/defs_gen/h2def.py b/tools/defs_gen/h2def.py
index 20b31856..1c0a79b8 100755
--- a/tools/defs_gen/h2def.py
+++ b/tools/defs_gen/h2def.py
@@ -306,20 +306,21 @@ def clean_func(buf):
pat = re.compile(r"""G_GNUC_WARN_UNUSED_RESULT|G_INLINE_FUNC""", re.MULTILINE)
buf = pat.sub('', buf)
- #strip *_DEPRECATED_IN_*_FOR (*):
- pat = re.compile(r"""[A-Z]+_DEPRECATED_IN_[0-9]_([0-9]*)_FOR\s*\(.*\)\S*""", re.MULTILINE)
+ #strip *_DEPRECATED_IN_*_FOR (*)
+ #e.g. GDK_DEPRECATED_IN_*_FOR (*) and GDK_PIXBUF_DEPRECATED_IN_*_FOR (*)
+ pat = re.compile(r"""([A-Z]+_){1,2}?DEPRECATED_IN_[0-9]_([0-9]*)_FOR\s*\(.*\)\S*""", re.MULTILINE)
buf = pat.sub('', buf)
#strip *_DEPRECATED*
- pat = re.compile(r"""[A-Z]+_DEPRECATED\S*""", re.MULTILINE)
+ pat = re.compile(r"""([A-Z]+_){1,2}?DEPRECATED\S*""", re.MULTILINE)
buf = pat.sub('', buf)
#strip *_AVAILABLE_IN_*
- pat = re.compile(r"""[A-Z]+_AVAILABLE_IN_[0-9]_[0-9]\S*""", re.MULTILINE)
+ pat = re.compile(r"""([A-Z]+_){1,2}?AVAILABLE_IN_[0-9]_[0-9]\S*""", re.MULTILINE)
buf = pat.sub('', buf)
#strip *_AVAILABLE_IN_ALL
- pat = re.compile(r"""[A-Z]+_AVAILABLE_IN_ALL\S*""", re.MULTILINE)
+ pat = re.compile(r"""([A-Z]+_){1,2}?AVAILABLE_IN_ALL\S*""", re.MULTILINE)
buf = pat.sub('', buf)
#strip G_DECLARE_FINAL_TYPE (*)