From be6eb21320b4688bcfcd8cbea33f7be29a76f2a2 Mon Sep 17 00:00:00 2001 From: John Finlay Date: Wed, 8 Jul 2009 15:47:44 -0700 Subject: * codegen/defsgen.py (clean_patterns): Strip out Windows DLL API macros. --- codegen/defsgen.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'codegen/defsgen.py') 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), ''), -- cgit