]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-39542: Simplify _Py_NewReference() (GH-18332)
authorVictor Stinner <vstinner@python.org>
Mon, 3 Feb 2020 16:55:05 +0000 (17:55 +0100)
committerGitHub <noreply@github.com>
Mon, 3 Feb 2020 16:55:04 +0000 (17:55 +0100)
commit49932fec62c616ec88da52642339d83ae719e924
treeb489d2b97cf56c0b51a15f27ecf4064c5084d9d8
parent24e5ad4689de9adc8e4a7d8c08fe400dcea668e6
bpo-39542: Simplify _Py_NewReference() (GH-18332)

* Remove _Py_INC_REFTOTAL and _Py_DEC_REFTOTAL macros: modify
  directly _Py_RefTotal.
* _Py_ForgetReference() is no longer defined if the Py_TRACE_REFS
  macro is not defined.
* Remove _Py_NewReference() implementation from object.c:
  unify the two implementations in object.h inline function.
* Fix Py_TRACE_REFS build: _Py_INC_TPALLOCS() macro has been removed.
Include/object.h
Modules/_testcapimodule.c
Objects/bytesobject.c
Objects/dictobject.c
Objects/object.c
Objects/tupleobject.c
Objects/unicodeobject.c