[pypy-svn] r52846 - in pypy/dist/pypy/lib: _ctypes app_test/ctypes
cfbolz at codespeak.net
cfbolz at codespeak.net
Sat Mar 22 23:35:03 CET 2008
Author: cfbolz
Date: Sat Mar 22 23:35:01 2008
New Revision: 52846
Added:
pypy/dist/pypy/lib/app_test/ctypes/test_prototypes.py
- copied, changed from r52827, pypy/dist/pypy/lib/ctypes/test/test_prototypes.py
Modified:
pypy/dist/pypy/lib/_ctypes/function.py
pypy/dist/pypy/lib/app_test/ctypes/description.txt
Log:
port more tests, fix a bug
Modified: pypy/dist/pypy/lib/_ctypes/function.py
==============================================================================
--- pypy/dist/pypy/lib/_ctypes/function.py (original)
+++ pypy/dist/pypy/lib/_ctypes/function.py Sat Mar 22 23:35:01 2008
@@ -49,7 +49,11 @@
elif callable(argument):
self.callable = argument
argtypes = [arg._ffiargshape for arg in self._argtypes_]
- restype = self._restype_._ffiargshape
+ restype = self._restype_
+ if restype is not None:
+ restype = restype._ffiargshape
+ else:
+ restype = 'O' # void
self._ptr = _rawffi.CallbackPtr(argument, argtypes, restype)
self._needs_free = True
self._buffer = self._ptr.byptr()
Modified: pypy/dist/pypy/lib/app_test/ctypes/description.txt
==============================================================================
--- pypy/dist/pypy/lib/app_test/ctypes/description.txt (original)
+++ pypy/dist/pypy/lib/app_test/ctypes/description.txt Sat Mar 22 23:35:01 2008
@@ -7,7 +7,7 @@
test_keeprefs.py # implementation details: ._objects
test_libc.py
test_macholib.py # OS X specific
-test_objects.py
+test_objects.py # implementation details: ._objects
test_parameters.py
test_prototypes.py
test_python_api.py # CPython specific
More information about the Pypy-commit
mailing list