diff options
author | Victor Stinner <vstinner@python.org> | 2020-12-14 21:40:40 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-14 21:40:40 (GMT) |
commit | 83d52044ae4def1e8611a4b1b9263b850ca5c458 (patch) | |
tree | cdc3b90536390556290ca0fc2f12ea54a0135289 /Include | |
parent | fdb9efce6ac211f973088eef508740c3fa2bd182 (diff) | |
download | cpython-83d52044ae4def1e8611a4b1b9263b850ca5c458.zip cpython-83d52044ae4def1e8611a4b1b9263b850ca5c458.tar.gz cpython-83d52044ae4def1e8611a4b1b9263b850ca5c458.tar.bz2 |
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 b4e2c8a..13f7a26 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 184878c..2515234 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; |