]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-102304: Move _Py_RefTotal to _PyRuntimeState (gh-102543)
authorEric Snow <ericsnowcurrently@gmail.com>
Mon, 20 Mar 2023 16:03:04 +0000 (10:03 -0600)
committerGitHub <noreply@github.com>
Mon, 20 Mar 2023 16:03:04 +0000 (10:03 -0600)
commitad77d16a6252c2e616bf41b981a6d919c1122b4d
tree17a73242035ac8da8c0096effe17d665cdfe843b
parent96e05b62e827a6dee6c658fea9b4976dfd8d30e3
gh-102304: Move _Py_RefTotal to _PyRuntimeState (gh-102543)

The essentially eliminates the global variable, with the associated benefits. This is also a precursor to isolating this bit of state to PyInterpreterState.

Folks that currently read _Py_RefTotal directly would have to start using _Py_GetGlobalRefTotal() instead.

https://github.com/python/cpython/issues/102304
13 files changed:
Include/cpython/object.h
Include/internal/pycore_object.h
Include/internal/pycore_object_state.h [new file with mode: 0644]
Include/internal/pycore_runtime.h
Include/object.h
Makefile.pre.in
Objects/object.c
PCbuild/pythoncore.vcxproj
PCbuild/pythoncore.vcxproj.filters
Python/pylifecycle.c
Python/pystate.c
Python/sysmodule.c
Tools/c-analyzer/cpython/ignored.tsv