mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
GH-125323: Convert DECREF_INPUTS_AND_REUSE_FLOAT into a function that takes PyStackRefs. (GH-125439)
This commit is contained in:
parent
67f6e08147
commit
06ca33020e
10 changed files with 69 additions and 44 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue