diff options
author | Victor Stinner <vstinner@python.org> | 2020-02-05 11:18:28 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-05 11:18:28 (GMT) |
commit | f16433a73138f279642e581074135694ddcfe965 (patch) | |
tree | b115e194f876673ec7e53a2e7bcc0aa0999f7521 /Include | |
parent | 787b6d548c250f36df6d3f3179f60d754c8aa5e3 (diff) | |
download | cpython-f16433a73138f279642e581074135694ddcfe965.zip cpython-f16433a73138f279642e581074135694ddcfe965.tar.gz cpython-f16433a73138f279642e581074135694ddcfe965.tar.bz2 |
bpo-39543: Remove unused _Py_Dealloc() macro (GH-18361)
The macro is defined after Py_DECREF() and so is no longer used by
Py_DECREF().
Moving _Py_Dealloc() macro back from cpython/object.h to object.h
would require to move a lot of definitions as well: PyTypeObject and
many related types used by PyTypeObject.
Keep _Py_Dealloc() as an opaque function call to avoid leaking
implementation details in the limited C API (object.h): remove
_Py_Dealloc() macro from cpython/object.h.
Diffstat (limited to 'Include')
-rw-r--r-- | Include/cpython/object.h | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/Include/cpython/object.h b/Include/cpython/object.h index 5fcad55..70f189c 100644 --- a/Include/cpython/object.h +++ b/Include/cpython/object.h @@ -327,16 +327,6 @@ _PyObject_GenericSetAttrWithDict(PyObject *, PyObject *, #define PyType_HasFeature(t,f) (((t)->tp_flags & (f)) != 0) -static inline void _Py_Dealloc_inline(PyObject *op) -{ - destructor dealloc = Py_TYPE(op)->tp_dealloc; -#ifdef Py_TRACE_REFS - _Py_ForgetReference(op); -#endif - (*dealloc)(op); -} -#define _Py_Dealloc(op) _Py_Dealloc_inline(op) - PyAPI_FUNC(PyObject *) _PyObject_FunctionStr(PyObject *); /* Safely decref `op` and set `op` to `op2`. |