summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Henstridge <james@daa.com.au>2003-12-23 14:59:04 +0000
committerJames Henstridge <jamesh@src.gnome.org>2003-12-23 14:59:04 +0000
commit7c1cb305f6d1e6543038701932d1b40570b330fb (patch)
tree1f410f51cc5c11a153010ade9b87bdee5dabadea
parent69faef32a91e89c5582cfd2f0e0f846789e616c7 (diff)
downloadpygtk-7c1cb305f6d1e6543038701932d1b40570b330fb.tar.gz
apply patch from Jon Willeke <willeke@users.sourceforge.net> to strip out
2003-12-23 James Henstridge <james@daa.com.au> * codegen/h2def.py (clean_func): apply patch from Jon Willeke <willeke@users.sourceforge.net> to strip out eg. G_BEGIN_DECLS, which was tripping up some of the following regexps (fixes bug #129414).
-rw-r--r--ChangeLog5
-rwxr-xr-xcodegen/h2def.py4
2 files changed, 9 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 81f7d490..fec3109d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2003-12-23 James Henstridge <james@daa.com.au>
+ * codegen/h2def.py (clean_func): apply patch from Jon Willeke
+ <willeke@users.sourceforge.net> to strip out eg. G_BEGIN_DECLS,
+ which was tripping up some of the following regexps (fixes bug
+ #129414).
+
* pygobject.c (pygobject_get_property): explicitly check if the
property is readable first, and raise an exception otherwise
(pygobject_set_property): check if property is readable (fixes bug
diff --git a/codegen/h2def.py b/codegen/h2def.py
index 65467a1b..67034b57 100755
--- a/codegen/h2def.py
+++ b/codegen/h2def.py
@@ -248,6 +248,10 @@ def clean_func(buf):
pat = re.compile(r"""^(typedef|struct|enum)(\s|.|\n)*?;\s*""", re.MULTILINE)
buf=pat.sub('',buf)
+ #strip DECLS macros
+ pat = re.compile(r"""G_BEGIN_DECLS|BEGIN_LIBGTOP_DECLS""", re.MULTILINE)
+ buf=pat.sub('',buf)
+
#multiple whitespace
pat = re.compile(r"""\s+""", re.MULTILINE)
buf=pat.sub(' ',buf)