]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-46008: Make runtime-global object/type lifecycle functions and state consistent...
authorEric Snow <ericsnowcurrently@gmail.com>
Thu, 9 Dec 2021 19:59:26 +0000 (12:59 -0700)
committerGitHub <noreply@github.com>
Thu, 9 Dec 2021 19:59:26 +0000 (12:59 -0700)
commitc8749b578324ad4089c8d014d9136bc42b065343
tree8b74af3da8568651c2c2068d9fe544617d70554f
parentd8a464ef0380692975d73a3a1513d901b6af8e65
bpo-46008: Make runtime-global object/type lifecycle functions and state consistent. (gh-29998)

This change is strictly renames and moving code around.  It helps in the following ways:

* ensures type-related init functions focus strictly on one of the three aspects (state, objects, types)
* passes in PyInterpreterState * to all those functions, simplifying work on moving types/objects/state to the interpreter
* consistent naming conventions help make what's going on more clear
* keeping API related to a type in the corresponding header file makes it more obvious where to look for it

https://bugs.python.org/issue46008
38 files changed:
Include/internal/pycore_bytesobject.h [new file with mode: 0644]
Include/internal/pycore_context.h
Include/internal/pycore_dict.h
Include/internal/pycore_exceptions.h [new file with mode: 0644]
Include/internal/pycore_floatobject.h
Include/internal/pycore_frame.h
Include/internal/pycore_genobject.h [new file with mode: 0644]
Include/internal/pycore_hamt.h
Include/internal/pycore_interp.h
Include/internal/pycore_list.h
Include/internal/pycore_long.h
Include/internal/pycore_long_state.h [new file with mode: 0644]
Include/internal/pycore_pyerrors.h
Include/internal/pycore_pylifecycle.h
Include/internal/pycore_runtime.h
Include/internal/pycore_sliceobject.h [new file with mode: 0644]
Include/internal/pycore_structseq.h
Include/internal/pycore_tuple.h
Include/internal/pycore_typeobject.h [new file with mode: 0644]
Include/internal/pycore_unicodeobject.h [new file with mode: 0644]
Makefile.pre.in
Objects/bytesobject.c
Objects/exceptions.c
Objects/floatobject.c
Objects/genobject.c
Objects/listobject.c
Objects/longobject.c
Objects/object.c
Objects/structseq.c
Objects/tupleobject.c
Objects/typeobject.c
Objects/unicodeobject.c
PCbuild/pythoncore.vcxproj
PCbuild/pythoncore.vcxproj.filters
Python/context.c
Python/errors.c
Python/hamt.c
Python/pylifecycle.c