GH-125323: Convert DECREF_INPUTS_AND_REUSE_FLOAT into a function that takes PyStackRefs. (GH-125439)

This commit is contained in:
Mark Shannon 2024-10-14 14:18:57 +01:00 committed by GitHub
parent 67f6e08147
commit 06ca33020e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 69 additions and 44 deletions

View file

@ -76,6 +76,13 @@ PyStackRef_AsPyObjectBorrow(_PyStackRef stackref)
#define PyStackRef_IsDeferred(ref) (((ref).bits & Py_TAG_BITS) == Py_TAG_DEFERRED)
static inline PyObject *
PyStackRef_NotDeferred_AsPyObject(_PyStackRef stackref)
{
assert(!PyStackRef_IsDeferred(stackref));
return (PyObject *)stackref.bits;
}
static inline PyObject *
PyStackRef_AsPyObjectSteal(_PyStackRef stackref)
{