[glibmm] h2def.py: Accept parameter names beginning with const
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm] h2def.py: Accept parameter names beginning with const
- Date: Mon, 11 Jan 2016 14:15:36 +0000 (UTC)
commit 379d93938569d8a63dfe7c6c7304a7738eb10aeb
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date: Mon Jan 11 15:13:51 2016 +0100
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
tools/defs_gen/h2def.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/tools/defs_gen/h2def.py b/tools/defs_gen/h2def.py
index 1f33771..513ecf8 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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]