Author: Amaury Forgeot d'Arc <[email protected]>
Branch: py3k
Changeset: r58756:b3d2220224d7
Date: 2012-10-28 19:37 +0100
http://bitbucket.org/pypy/pypy/changeset/b3d2220224d7/
Log: Use _ffi in ctypes module (Same hack as 2.7 version)
diff --git a/lib-python/3.2/ctypes/__init__.py
b/lib-python/3.2/ctypes/__init__.py
--- a/lib-python/3.2/ctypes/__init__.py
+++ b/lib-python/3.2/ctypes/__init__.py
@@ -4,6 +4,7 @@
__version__ = "1.1.0"
+import _ffi
from _ctypes import Union, Structure, Array
from _ctypes import _Pointer
from _ctypes import CFuncPtr as _CFuncPtr
@@ -350,7 +351,10 @@
self._FuncPtr = _FuncPtr
if handle is None:
- self._handle = _dlopen(self._name, mode)
+ if flags & _FUNCFLAG_CDECL:
+ self._handle = _ffi.CDLL(name, mode)
+ else:
+ self._handle = _ffi.WinDLL(name, mode)
else:
self._handle = handle
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit