[pypy-commit] pypy cpyext-avoid-roundtrip: we can use the macros now

antocuni pypy.commits at gmail.com
Mon Oct 9 05:21:21 EDT 2017


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: cpyext-avoid-roundtrip
Changeset: r92670:c0c845f0324a
Date: 2017-10-09 09:04 +0200
http://bitbucket.org/pypy/pypy/changeset/c0c845f0324a/

Log:	we can use the macros now

diff --git a/pypy/module/cpyext/src/object.c b/pypy/module/cpyext/src/object.c
--- a/pypy/module/cpyext/src/object.c
+++ b/pypy/module/cpyext/src/object.c
@@ -127,9 +127,9 @@
         return (PyVarObject*)PyErr_NoMemory();
     
     if (type->tp_itemsize == 0)
-        return PyObject_Init(py_obj, type);
+        return PyObject_INIT(py_obj, type);
     else
-        return PyObject_InitVar((PyVarObject*)py_obj, type, nitems);
+        return PyObject_INIT_VAR((PyVarObject*)py_obj, type, nitems);
 }
 
 PyObject *


More information about the pypy-commit mailing list