summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjell Ahlstedt <kjell.ahlstedt@bredband.net>2016-01-11 15:13:51 +0100
committerKjell Ahlstedt <kjell.ahlstedt@bredband.net>2016-01-11 15:13:51 +0100
commit379d93938569d8a63dfe7c6c7304a7738eb10aeb (patch)
treee85acea55b0cfb726eb50ca57708aa00ab3d5fd4
parent26efc8099c995c922acee05ed7223da1787ce2ad (diff)
downloadglibmm-379d93938569d8a63dfe7c6c7304a7738eb10aeb.tar.gz
h2def.py: Accept parameter names beginning with const
h2def.py misunderstood function declarations where the name of a parameter begins with const, e.g. ClutterBindConstraint *constraint. https://mail.gnome.org/archives/gtkmm-list/2016-January/msg00004.html
-rwxr-xr-xtools/defs_gen/h2def.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/defs_gen/h2def.py b/tools/defs_gen/h2def.py
index 1f33771f..513ecf86 100755
--- a/tools/defs_gen/h2def.py
+++ b/tools/defs_gen/h2def.py
@@ -349,7 +349,7 @@ def clean_func(buf):
buf = buf.replace('G_CONST_RETURN ', 'const-')
buf = buf.replace('const ', 'const-')
# This is for types such as 'const gchar* const *'
- buf = buf.replace('* const', '*-const')
+ buf = re.sub(r'\* const\b', '*-const', buf)
#strip GSEAL macros from the middle of function declarations:
pat = re.compile(r"""GSEAL""", re.VERBOSE)