Author: Matti Picus <[email protected]>
Branch: win32-fixes4
Changeset: r70259:32fe69874e10
Date: 2014-03-24 19:45 +0200
http://bitbucket.org/pypy/pypy/changeset/32fe69874e10/

Log:    fix for llgraph untranslated testing

diff --git a/rpython/rtyper/lltypesystem/ll2ctypes.py 
b/rpython/rtyper/lltypesystem/ll2ctypes.py
--- a/rpython/rtyper/lltypesystem/ll2ctypes.py
+++ b/rpython/rtyper/lltypesystem/ll2ctypes.py
@@ -366,9 +366,15 @@
                 restype = get_ctypes_type(T.TO.RESULT)
             try:
                 kwds = {'use_errno': True}
+                if getattr(T.TO, 'ABI', 'FFI_STDCALL'):
+                    # for win32 system call
+                    return ctypes.WINFUNCTYPE(restype, *argtypes, **kwds)
                 return ctypes.CFUNCTYPE(restype, *argtypes, **kwds)
             except TypeError:
                 # unexpected 'use_errno' argument, old ctypes version
+                if getattr(T.TO, 'ABI', 'FFI_STDCALL'):
+                    # for win32 system call
+                    return ctypes.WINFUNCTYPE(restype, *argtypes)
                 return ctypes.CFUNCTYPE(restype, *argtypes)
         elif isinstance(T.TO, lltype.OpaqueType):
             return ctypes.c_void_p
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to