[glibmm] gmmproc: Make h2def.py recognize some GDK_PIXBUF macros



commit 0b33854c0effe4e300c6350d507982d5ed126e7e
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date:   Wed Jun 15 10:41:04 2016 +0200

    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.

 tools/defs_gen/h2def.py |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/tools/defs_gen/h2def.py b/tools/defs_gen/h2def.py
index 20b3185..1c0a79b 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 (*)


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