File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -528,6 +528,7 @@ PyStackRef_FromPyObjectImmortal(PyObject *obj)
528528 return (_PyStackRef ){ .bits = (uintptr_t )obj | Py_TAG_IMMORTAL };
529529}
530530
531+ /* WARNING: This macro evaluates its argument twice */
531532#ifdef _WIN32
532533#define PyStackRef_DUP (REF ) \
533534 (PyStackRef_IsUncountedMortal(REF) ? (Py_INCREF_MORTAL(BITS_TO_PTR(REF)), (REF)) : (REF))
@@ -565,7 +566,8 @@ PyStackRef_MakeHeapSafe(_PyStackRef ref)
565566#ifdef _WIN32
566567#define PyStackRef_CLOSE (REF ) \
567568do { \
568- if (PyStackRef_IsUncountedMortal(REF)) Py_DECREF_MORTAL(BITS_TO_PTR(REF)); \
569+ _PyStackRef _temp = (REF);
570+ if (PyStackRef_IsUncountedMortal (_temp )) Py_DECREF_MORTAL (BITS_TO_PTR (_temp )); \
569571} while (0 )
570572#else
571573static inline void
You can’t perform that action at this time.
0 commit comments