GH-128682: Convert explicit loops closing arrays into DECREF_INPUTS. (GH-128822)

* Mark Py_DECREF and Py_XDECREF as escaping

* Remove explicit loops for clearing array inputs
This commit is contained in:
Mark Shannon 2025-01-14 15:08:56 +00:00 committed by GitHub
parent bbd3300ae8
commit f49a1df6f3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 305 additions and 265 deletions

View file

@ -567,7 +567,6 @@ NON_ESCAPING_FUNCTIONS = (
"PyUnicode_READ_CHAR",
"Py_ARRAY_LENGTH",
"Py_CLEAR",
"Py_DECREF",
"Py_FatalError",
"Py_INCREF",
"Py_IS_TYPE",
@ -577,7 +576,6 @@ NON_ESCAPING_FUNCTIONS = (
"Py_TYPE",
"Py_UNREACHABLE",
"Py_Unicode_GET_LENGTH",
"Py_XDECREF",
"_PyCode_CODE",
"_PyDictValues_AddToInsertionOrder",
"_PyErr_Occurred",
@ -620,7 +618,6 @@ NON_ESCAPING_FUNCTIONS = (
"_PyUnicode_JoinArray",
"_Py_CHECK_EMSCRIPTEN_SIGNALS_PERIODICALLY",
"_Py_DECREF_NO_DEALLOC",
"_Py_DECREF_SPECIALIZED",
"_Py_EnterRecursiveCallTstateUnchecked",
"_Py_ID",
"_Py_IsImmortal",