bpo-42639: Cleanup atexitmodule.c (GH-23770) · python/cpython@83d5204 · GitHub
Skip to content

Commit 83d5204

Browse files
authored
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.
1 parent fdb9efc commit 83d5204

5 files changed

Lines changed: 125 additions & 158 deletions

File tree

Include/cpython/pylifecycle.h

Lines changed: 0 additions & 5 deletions

Include/internal/pycore_interp.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,8 @@ struct _is {
234234
PyObject *after_forkers_child;
235235
#endif
236236
/* AtExit module */
237-
void (*pyexitfunc)(PyObject *);
238-
PyObject *pyexitmodule;
237+
void (*atexit_func)(PyObject *);
238+
PyObject *atexit_module;
239239

240240
uint64_t tstate_next_unique_id;
241241

Lib/test/test_atexit.py

Lines changed: 12 additions & 11 deletions

0 commit comments

Comments
 (0)