[pypy-commit] pypy cpyext-avoid-roundtrip: (antocuni, arigo): blindly try to fix cppyy
antocuni
pypy.commits at gmail.com
Tue Oct 10 11:54:55 EDT 2017
Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: cpyext-avoid-roundtrip
Changeset: r92708:160e55b245b0
Date: 2017-10-10 17:54 +0200
http://bitbucket.org/pypy/pypy/changeset/160e55b245b0/
Log: (antocuni, arigo): blindly try to fix cppyy
diff --git a/pypy/module/_cppyy/converter.py b/pypy/module/_cppyy/converter.py
--- a/pypy/module/_cppyy/converter.py
+++ b/pypy/module/_cppyy/converter.py
@@ -658,8 +658,8 @@
if hasattr(space, "fake"):
raise NotImplementedError
space.getbuiltinmodule("cpyext")
- from pypy.module.cpyext.pyobject import Py_DecRef, PyObject
- Py_DecRef(space, rffi.cast(PyObject, rffi.cast(rffi.VOIDPP, arg)[0]))
+ from pypy.module.cpyext.pyobject import decref, PyObject
+ decref(space, rffi.cast(PyObject, rffi.cast(rffi.VOIDPP, arg)[0]))
class MacroConverter(TypeConverter):
diff --git a/pypy/module/_cppyy/executor.py b/pypy/module/_cppyy/executor.py
--- a/pypy/module/_cppyy/executor.py
+++ b/pypy/module/_cppyy/executor.py
@@ -220,11 +220,11 @@
def wrap_result(self, space, lresult):
space.getbuiltinmodule("cpyext")
- from pypy.module.cpyext.pyobject import PyObject, from_ref, make_ref, Py_DecRef
+ from pypy.module.cpyext.pyobject import PyObject, from_ref, make_ref, decref
result = rffi.cast(PyObject, lresult)
w_obj = from_ref(space, result)
if result:
- Py_DecRef(space, result)
+ decref(space, result)
return w_obj
def execute(self, space, cppmethod, cppthis, num_args, args):
More information about the pypy-commit
mailing list