Lars Munch
unread,Jan 2, 2014, 4:47:31 PM1/2/14Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ctyp...@googlegroups.com, Lars Munch
On win32 (mingw headers) add __intX types explicitly to avoid syntax error.
---
ctypesgencore/parser/preprocessor.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/ctypesgencore/parser/preprocessor.py b/ctypesgencore/parser/preprocessor.py
index afe24a4..217fc0c 100644
--- a/ctypesgencore/parser/preprocessor.py
+++ b/ctypesgencore/parser/preprocessor.py
@@ -107,6 +107,13 @@ class PreprocessorParser(object):
"__const=const", "__asm__(x)=",
"__asm(x)=", "CTYPESGEN=1"]
+ # On win32 (mingw headers) add __intX types explicitly
+ if sys.platform == 'win32':
+ self.defines += ["__int8=char",
+ "__int16=short"
+ "__int32=int",
+ "__int64=long long" ]
+
# On OSX, explicitly add these defines to keep from getting syntax
# errors in the OSX standard headers.
if sys.platform == 'darwin':
--
1.8.5.2