mirror of
https://github.com/python/cpython.git
synced 2025-10-06 23:21:06 +00:00
gh-108014: Add Py_IsFinalizing() function (#108032)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This commit is contained in:
parent
cc58ec9724
commit
3ff5ef2ad3
9 changed files with 24 additions and 9 deletions
|
@ -129,7 +129,7 @@ _PyRuntime_Finalize(void)
|
|||
}
|
||||
|
||||
int
|
||||
_Py_IsFinalizing(void)
|
||||
Py_IsFinalizing(void)
|
||||
{
|
||||
return _PyRuntimeState_GetFinalizing(&_PyRuntime) != NULL;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue