summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Finlay <finlay@moeraki.com>2009-07-08 15:47:44 -0700
committerJohn Finlay <finlay@moeraki.com>2009-07-08 15:47:44 -0700
commitbe6eb21320b4688bcfcd8cbea33f7be29a76f2a2 (patch)
tree591b75e5b887a0cd90e34c3c2d703131dacf9b21
parent2214cad3529979e29342a7e1fdc2915b90ce9c10 (diff)
downloadpygobject-be6eb21320b4688bcfcd8cbea33f7be29a76f2a2.tar.gz
pygobject-be6eb21320b4688bcfcd8cbea33f7be29a76f2a2.tar.xz
pygobject-be6eb21320b4688bcfcd8cbea33f7be29a76f2a2.zip
* codegen/defsgen.py (clean_patterns): Strip out Windows DLL API macros.
-rwxr-xr-xcodegen/defsgen.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/codegen/defsgen.py b/codegen/defsgen.py
index 670d411..6c2e63d 100755
--- a/codegen/defsgen.py
+++ b/codegen/defsgen.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- Mode: Python; py-indent-offset: 4 -*-
#
-# Copyright (C) 2006-2008 John Finlay.
+# Copyright (C) 2006-2009 John Finlay.
#
# Scan the given public .h files of a GTK module (or module using
# GTK object conventions) and generates a set of scheme defs.
@@ -130,8 +130,8 @@ clean_patterns = [
(re.compile(r"\\\n", re.MULTILINE), ''),
# remove preprocess directives
(re.compile(r"""^[#].*?$""", re.MULTILINE), ''),
- # strip DECLS macros
- (re.compile(r"""G_BEGIN_DECLS|BEGIN_LIBGTOP_DECLS|G_END_DECLS""",
+ # strip DECLS macros and Windows DLL API macros
+ (re.compile(r"""G_BEGIN_DECLS|BEGIN_LIBGTOP_DECLS|G_END_DECLS|[A-Z]+_API """,
re.MULTILINE), ''),
# remove extern "C"
(re.compile(r'^\s*(extern)\s+"C"\s+{', re.MULTILINE), ''),