diff options
author | 2020-12-14 22:40:40 +0100 | |
---|---|---|
committer | 2020-12-14 22:40:40 +0100 | |
commit | 83d52044ae4def1e8611a4b1b9263b850ca5c458 (patch) | |
tree | cdc3b90536390556290ca0fc2f12ea54a0135289 /Include | |
parent | bpo-41877: Check for misspelled speccing arguments (GH-23737) (diff) | |
download | cpython-83d52044ae4def1e8611a4b1b9263b850ca5c458.tar.gz cpython-83d52044ae4def1e8611a4b1b9263b850ca5c458.tar.bz2 cpython-83d52044ae4def1e8611a4b1b9263b850ca5c458.zip |
bpo-42639: Cleanup atexitmodule.c (GH-23770)
* Rename "atexitmodule_state" to "struct atexit_state".
* Rename "modstate" to "state".
* Rename "self" parameter to "module".
* test_atexit uses textwrap.dedent().
* Remove _Py_PyAtExit() function: inline it into atexit_exec().
* PyInterpreterState: rename pyexitfunc to atexit_func, rename
pyexitmodule to atexit_module.
Diffstat (limited to 'Include')
-rw-r--r-- | Include/cpython/pylifecycle.h | 5 | ||||
-rw-r--r-- | Include/internal/pycore_interp.h | 4 |
2 files changed, 2 insertions, 7 deletions
diff --git a/Include/cpython/pylifecycle.h b/Include/cpython/pylifecycle.h index b4e2c8a8427..13f7a26ba12 100644 --- a/Include/cpython/pylifecycle.h +++ b/Include/cpython/pylifecycle.h @@ -35,11 +35,6 @@ PyAPI_FUNC(int) Py_RunMain(void); PyAPI_FUNC(void) _Py_NO_RETURN Py_ExitStatusException(PyStatus err); -/* Py_PyAtExit is for the atexit module, Py_AtExit is for low-level - * exit functions. - */ -PyAPI_FUNC(void) _Py_PyAtExit(void (*func)(PyObject *), PyObject *); - /* Restore signals that the interpreter has called SIG_IGN on to SIG_DFL. */ PyAPI_FUNC(void) _Py_RestoreSignals(void); diff --git a/Include/internal/pycore_interp.h b/Include/internal/pycore_interp.h index 184878ce146..2515234708b 100644 --- a/Include/internal/pycore_interp.h +++ b/Include/internal/pycore_interp.h @@ -234,8 +234,8 @@ struct _is { PyObject *after_forkers_child; #endif /* AtExit module */ - void (*pyexitfunc)(PyObject *); - PyObject *pyexitmodule; + void (*atexit_func)(PyObject *); + PyObject *atexit_module; uint64_t tstate_next_unique_id; |