[pypy-commit] pypy py3.5: hg merge default
arigo
pypy.commits at gmail.com
Wed Aug 23 13:06:36 EDT 2017
Author: Armin Rigo <arigo at tunes.org>
Branch: py3.5
Changeset: r92238:89b8fc097575
Date: 2017-08-23 19:05 +0200
http://bitbucket.org/pypy/pypy/changeset/89b8fc097575/
Log: hg merge default
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
@@ -269,6 +269,11 @@
#define _PyGC_FINALIZED(o) 1
#define PyType_IS_GC(tp) 1
+#define PyObject_GC_Track(o) do { } while(0)
+#define PyObject_GC_UnTrack(o) do { } while(0)
+#define _PyObject_GC_TRACK(o) do { } while(0)
+#define _PyObject_GC_UNTRACK(o) do { } while(0)
+
/* Utility macro to help write tp_traverse functions.
* To use this macro, the tp_traverse function must name its arguments
* "visit" and "arg". This is intended to keep tp_traverse functions
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
@@ -80,24 +80,6 @@
def PyObject_GC_Del(space, obj):
PyObject_Free(space, obj)
- at cpython_api([rffi.VOIDP], lltype.Void)
-def PyObject_GC_Track(space, op):
- """Adds the object op to the set of container objects tracked by the
- collector. The collector can run at unexpected times so objects must be
- valid while being tracked. This should be called once all the fields
- followed by the tp_traverse handler become valid, usually near the
- end of the constructor."""
- pass
-
- at cpython_api([rffi.VOIDP], lltype.Void)
-def PyObject_GC_UnTrack(space, op):
- """Remove the object op from the set of container objects tracked by the
- collector. Note that PyObject_GC_Track() can be called again on
- this object to add it back to the set of tracked objects. The deallocator
- (tp_dealloc handler) should call this for the object before any of
- the fields used by the tp_traverse handler become invalid."""
- pass
-
@cpython_api([PyObject], PyObjectP, error=CANNOT_FAIL)
def _PyObject_GetDictPtr(space, op):
return lltype.nullptr(PyObjectP.TO)
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
@@ -625,18 +625,6 @@
resized object or NULL on failure."""
raise NotImplementedError
- at cpython_api([PyObject], lltype.Void)
-def _PyObject_GC_TRACK(space, op):
- """A macro version of PyObject_GC_Track(). It should not be used for
- extension modules."""
- raise NotImplementedError
-
- at cpython_api([PyObject], lltype.Void)
-def _PyObject_GC_UNTRACK(space, op):
- """A macro version of PyObject_GC_UnTrack(). It should not be used for
- extension modules."""
- raise NotImplementedError
-
@cpython_api([PyFrameObject], PyObject)
def PyGen_New(space, frame):
"""Create and return a new generator object based on the frame object. A
More information about the pypy-commit
mailing list