[pypy-commit] pypy cpyext-nowrapper: finally, this no longer needs the space
antocuni
pypy.commits at gmail.com
Sun Oct 8 18:12:57 EDT 2017
Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: cpyext-nowrapper
Changeset: r92659:0fd504cab8d9
Date: 2017-10-07 18:38 +0200
http://bitbucket.org/pypy/pypy/changeset/0fd504cab8d9/
Log: finally, this no longer needs the space
diff --git a/pypy/module/cpyext/object.py b/pypy/module/cpyext/object.py
--- a/pypy/module/cpyext/object.py
+++ b/pypy/module/cpyext/object.py
@@ -58,7 +58,7 @@
typedescr = get_typedescr(w_type.layout.typedef)
pyobj = typedescr.allocate(space, w_type, itemcount=nitems)
else:
- return _allocate_generic_object(space, tp, nitems)
+ return _allocate_generic_object(tp, nitems)
#
if tp.c_tp_itemsize == 0:
w_obj = PyObject_Init(space, pyobj, tp)
diff --git a/pypy/module/cpyext/pyobject.py b/pypy/module/cpyext/pyobject.py
--- a/pypy/module/cpyext/pyobject.py
+++ b/pypy/module/cpyext/pyobject.py
@@ -21,7 +21,7 @@
#________________________________________________________
# type description
-def _allocate_generic_object(space, pytype, itemcount, immortal=False):
+def _allocate_generic_object(pytype, itemcount, immortal=False):
# Don't increase refcount for non-heaptypes
flags = rffi.cast(lltype.Signed, pytype.c_tp_flags)
if flags & Py_TPFLAGS_HEAPTYPE:
@@ -58,7 +58,7 @@
pytype = as_pyobj(space, w_type)
pytype = rffi.cast(PyTypeObjectPtr, pytype)
assert pytype
- return _allocate_generic_object(space, pytype, itemcount, immortal)
+ return _allocate_generic_object(pytype, itemcount, immortal)
def attach(self, space, pyobj, w_obj, w_userdata=None):
pass
More information about the pypy-commit
mailing list