summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-08-18 10:34:41 (GMT)
committerGitHub <noreply@github.com>2023-08-18 10:34:41 (GMT)
commit3ff5ef2ad3d89c3ccf4e07ac8fdd798267ae6c61 (patch)
tree4bc924872b423ceb95d0288681ff8ffecc086560 /Python
parentcc58ec9724772a8d5c4a5c9a6525f9f96e994227 (diff)
downloadcpython-3ff5ef2ad3d89c3ccf4e07ac8fdd798267ae6c61.zip
cpython-3ff5ef2ad3d89c3ccf4e07ac8fdd798267ae6c61.tar.gz
cpython-3ff5ef2ad3d89c3ccf4e07ac8fdd798267ae6c61.tar.bz2
gh-108014: Add Py_IsFinalizing() function (#108032)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Diffstat (limited to 'Python')
-rw-r--r--Python/pylifecycle.c2
-rw-r--r--Python/sysmodule.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
index 9063396..263ead3 100644
--- a/Python/pylifecycle.c
+++ b/Python/pylifecycle.c
@@ -129,7 +129,7 @@ _PyRuntime_Finalize(void)
}
int
-_Py_IsFinalizing(void)
+Py_IsFinalizing(void)
{
return _PyRuntimeState_GetFinalizing(&_PyRuntime) != NULL;
}
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index f829011..5453360 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -2095,7 +2095,7 @@ static PyObject *
sys_is_finalizing_impl(PyObject *module)
/*[clinic end generated code: output=735b5ff7962ab281 input=f0df747a039948a5]*/
{
- return PyBool_FromLong(_Py_IsFinalizing());
+ return PyBool_FromLong(Py_IsFinalizing());
}
#ifdef Py_STATS