gh-110397: Add Py_IsFinalizing() to the stable ABI (#110441)

This commit is contained in:
Victor Stinner 2023-10-07 17:59:16 +02:00 committed by GitHub
parent b987fdb19b
commit 64f158e7b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 9 additions and 2 deletions

View File

@ -840,6 +840,7 @@ function,Py_Initialize,3.2,,
function,Py_InitializeEx,3.2,, function,Py_InitializeEx,3.2,,
function,Py_Is,3.10,, function,Py_Is,3.10,,
function,Py_IsFalse,3.10,, function,Py_IsFalse,3.10,,
function,Py_IsFinalizing,3.13,,
function,Py_IsInitialized,3.2,, function,Py_IsInitialized,3.2,,
function,Py_IsNone,3.10,, function,Py_IsNone,3.10,,
function,Py_IsTrue,3.10,, function,Py_IsTrue,3.10,,

View File

@ -81,5 +81,3 @@ PyAPI_FUNC(PyStatus) Py_NewInterpreterFromConfig(
typedef void (*atexit_datacallbackfunc)(void *); typedef void (*atexit_datacallbackfunc)(void *);
PyAPI_FUNC(int) PyUnstable_AtExit( PyAPI_FUNC(int) PyUnstable_AtExit(
PyInterpreterState *, atexit_datacallbackfunc, void *); PyInterpreterState *, atexit_datacallbackfunc, void *);
PyAPI_FUNC(int) Py_IsFinalizing(void);

View File

@ -60,6 +60,10 @@ PyAPI_FUNC(PyOS_sighandler_t) PyOS_setsig(int, PyOS_sighandler_t);
PyAPI_DATA(const unsigned long) Py_Version; PyAPI_DATA(const unsigned long) Py_Version;
#endif #endif
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030D0000
PyAPI_FUNC(int) Py_IsFinalizing(void);
#endif
#ifndef Py_LIMITED_API #ifndef Py_LIMITED_API
# define Py_CPYTHON_PYLIFECYCLE_H # define Py_CPYTHON_PYLIFECYCLE_H
# include "cpython/pylifecycle.h" # include "cpython/pylifecycle.h"

View File

@ -851,6 +851,7 @@ SYMBOL_NAMES = (
"Py_InitializeEx", "Py_InitializeEx",
"Py_Is", "Py_Is",
"Py_IsFalse", "Py_IsFalse",
"Py_IsFinalizing",
"Py_IsInitialized", "Py_IsInitialized",
"Py_IsNone", "Py_IsNone",
"Py_IsTrue", "Py_IsTrue",

View File

@ -2460,3 +2460,5 @@
added = '3.13' added = '3.13'
[function.PyMapping_HasKeyStringWithError] [function.PyMapping_HasKeyStringWithError]
added = '3.13' added = '3.13'
[function.Py_IsFinalizing]
added = '3.13'

1
PC/python3dll.c generated
View File

@ -69,6 +69,7 @@ EXPORT_FUNC(Py_Initialize)
EXPORT_FUNC(Py_InitializeEx) EXPORT_FUNC(Py_InitializeEx)
EXPORT_FUNC(Py_Is) EXPORT_FUNC(Py_Is)
EXPORT_FUNC(Py_IsFalse) EXPORT_FUNC(Py_IsFalse)
EXPORT_FUNC(Py_IsFinalizing)
EXPORT_FUNC(Py_IsInitialized) EXPORT_FUNC(Py_IsInitialized)
EXPORT_FUNC(Py_IsNone) EXPORT_FUNC(Py_IsNone)
EXPORT_FUNC(Py_IsTrue) EXPORT_FUNC(Py_IsTrue)