diff options
author | Eric Snow <ericsnowcurrently@gmail.com> | 2023-04-06 00:42:02 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-06 00:42:02 (GMT) |
commit | 03089fdccc7dbe3f69227fbd570df92278371e7f (patch) | |
tree | 3b5440d14daa9f23689bfb2e07d0730f3839b219 /PCbuild | |
parent | 4ec8dd10bd4682793559c4eccbcf6ae00688c4c3 (diff) | |
download | cpython-03089fdccc7dbe3f69227fbd570df92278371e7f.zip cpython-03089fdccc7dbe3f69227fbd570df92278371e7f.tar.gz cpython-03089fdccc7dbe3f69227fbd570df92278371e7f.tar.bz2 |
gh-101659: Add _Py_AtExit() (gh-103298)
The function is like Py_AtExit() but for a single interpreter. This is a companion to the atexit module's register() function, taking a C callback instead of a Python one.
We also update the _xxinterpchannels module to use _Py_AtExit(), which is the motivating case. (This is inspired by pain points felt while working on gh-101660.)
Diffstat (limited to 'PCbuild')
-rw-r--r-- | PCbuild/pythoncore.vcxproj | 1 | ||||
-rw-r--r-- | PCbuild/pythoncore.vcxproj.filters | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj index 8fab600..29f32db 100644 --- a/PCbuild/pythoncore.vcxproj +++ b/PCbuild/pythoncore.vcxproj @@ -197,6 +197,7 @@ <ClInclude Include="..\Include\internal\pycore_asdl.h" /> <ClInclude Include="..\Include\internal\pycore_ast.h" /> <ClInclude Include="..\Include\internal\pycore_ast_state.h" /> + <ClInclude Include="..\Include\internal\pycore_atexit.h" /> <ClInclude Include="..\Include\internal\pycore_atomic.h" /> <ClInclude Include="..\Include\internal\pycore_atomic_funcs.h" /> <ClInclude Include="..\Include\internal\pycore_bitutils.h" /> diff --git a/PCbuild/pythoncore.vcxproj.filters b/PCbuild/pythoncore.vcxproj.filters index 6c5d8dd..6a622fd 100644 --- a/PCbuild/pythoncore.vcxproj.filters +++ b/PCbuild/pythoncore.vcxproj.filters @@ -498,6 +498,9 @@ <ClInclude Include="..\Include\internal\pycore_ast_state.h"> <Filter>Include\internal</Filter> </ClInclude> + <ClInclude Include="..\Include\internal\pycore_atexit.h"> + <Filter>Include\internal</Filter> + </ClInclude> <ClInclude Include="..\Include\internal\pycore_atomic.h"> <Filter>Include\internal</Filter> </ClInclude> |