[pypy-svn] r75110 - pypy/trunk/pypy/module/cpyext
afa at codespeak.net
afa at codespeak.net
Fri Jun 4 17:16:40 CEST 2010
Author: afa
Date: Fri Jun 4 17:16:38 2010
New Revision: 75110
Modified:
pypy/trunk/pypy/module/cpyext/api.py
Log:
Fix test failures.
I probably wrote 500 lines of code before I found the mistake.
Modified: pypy/trunk/pypy/module/cpyext/api.py
==============================================================================
--- pypy/trunk/pypy/module/cpyext/api.py (original)
+++ pypy/trunk/pypy/module/cpyext/api.py Fri Jun 4 17:16:38 2010
@@ -656,12 +656,13 @@
ptr.value = ctypes.cast(ll2ctypes.lltype2ctypes(make_ref(space, w_obj)),
ctypes.c_void_p).value
elif typ in ('PyObject*', 'PyTypeObject*'):
- in_dll = ll2ctypes.get_ctypes_type(PyObject).in_dll(bridge, name)
if name.startswith('PyPyExc_'):
# we already have the pointer
+ in_dll = ll2ctypes.get_ctypes_type(PyObject).in_dll(bridge, name)
py_obj = ll2ctypes.ctypes2lltype(PyObject, in_dll)
else:
# we have a structure, get its address
+ in_dll = ll2ctypes.get_ctypes_type(PyObject.TO).in_dll(bridge, name)
py_obj = ll2ctypes.ctypes2lltype(PyObject, ctypes.pointer(in_dll))
from pypy.module.cpyext.pyobject import (
track_reference, get_typedescr)
More information about the Pypy-commit
mailing list