[pypy-commit] pypy py3.5: add dummy (non-)implementations

arigo pypy.commits at gmail.com
Thu Mar 9 11:32:31 EST 2017


Author: Armin Rigo <arigo at tunes.org>
Branch: py3.5
Changeset: r90611:d81cac9fe8ad
Date: 2017-03-09 17:31 +0100
http://bitbucket.org/pypy/pypy/changeset/d81cac9fe8ad/

Log:	add dummy (non-)implementations

diff --git a/pypy/module/cpyext/include/object.h b/pypy/module/cpyext/include/object.h
--- a/pypy/module/cpyext/include/object.h
+++ b/pypy/module/cpyext/include/object.h
@@ -240,6 +240,7 @@
 
 /* dummy GC macros */
 #define _PyGC_FINALIZED(o) 1
+#define PyType_IS_GC(tp) 1
 
 /* Utility macro to help write tp_traverse functions.
  * To use this macro, the tp_traverse function must name its arguments
diff --git a/pypy/module/cpyext/stubs.py b/pypy/module/cpyext/stubs.py
--- a/pypy/module/cpyext/stubs.py
+++ b/pypy/module/cpyext/stubs.py
@@ -2077,3 +2077,12 @@
     it causes an exception to immediately be thrown; this is used for the
     throw() methods of generator objects."""
     raise NotImplementedError
+
+ at cpython_api([PyObject], rffi.INT_real, error=-1)
+def PyObject_CallFinalizerFromDealloc(space, self):
+    """Call tp_finalize() once, taking care of reference counting.
+
+    NOT IMPLEMENTED: might need to keep the PyPy object alive even while
+    tp_dealloc() is called, which the GC doesn't do so far.
+    """
+    raise NotImplementedError


More information about the pypy-commit mailing list