[pypy-commit] pypy py3k: fix

rlamy pypy.commits at gmail.com
Mon Feb 1 11:31:13 EST 2016


Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: py3k
Changeset: r82035:2f9a601ed994
Date: 2016-02-01 16:29 +0000
http://bitbucket.org/pypy/pypy/changeset/2f9a601ed994/

Log:	fix

diff --git a/pypy/module/cpyext/api.py b/pypy/module/cpyext/api.py
--- a/pypy/module/cpyext/api.py
+++ b/pypy/module/cpyext/api.py
@@ -445,8 +445,8 @@
 TYPES = {}
 GLOBALS = { # this needs to include all prebuilt pto, otherwise segfaults occur
     '_Py_NoneStruct#': ('PyObject*', 'space.w_None'),
-    '_Py_TrueStruct#': ('PyIntObject*', 'space.w_True'),
-    '_Py_ZeroStruct#': ('PyIntObject*', 'space.w_False'),
+    '_Py_TrueStruct#': ('PyObject*', 'space.w_True'),
+    '_Py_ZeroStruct#': ('PyObject*', 'space.w_False'),
     '_Py_NotImplementedStruct#': ('PyObject*', 'space.w_NotImplemented'),
     '_Py_EllipsisObject#': ('PyObject*', 'space.w_Ellipsis'),
     'PyDateTimeAPI': ('PyDateTime_CAPI*', 'None'),
@@ -855,7 +855,7 @@
                 assert False, "Unknown static pointer: %s %s" % (typ, name)
             ptr.value = ctypes.cast(ll2ctypes.lltype2ctypes(value),
                                     ctypes.c_void_p).value
-        elif typ in ('PyObject*', 'PyTypeObject*', 'PyIntObject*'):
+        elif typ in ('PyObject*', 'PyTypeObject*'):
             if name.startswith('PyPyExc_') or name.startswith('cpyexttestExc_'):
                 # we already have the pointer
                 in_dll = ll2ctypes.get_ctypes_type(PyObject).in_dll(bridge, name)
@@ -1149,7 +1149,7 @@
         if name.startswith('PyExc_'):
             name = '_' + name
         w_obj = eval(expr)
-        if typ in ('PyObject*', 'PyTypeObject*', 'PyIntObject*'):
+        if typ in ('PyObject*', 'PyTypeObject*'):
             struct_ptr = make_ref(space, w_obj)
         elif typ == 'PyDateTime_CAPI*':
             continue


More information about the pypy-commit mailing list