Skip to content

Commit 17b97c6

Browse files
committed
Make sure PyStackRef_DUP returns a reference
1 parent 0b7a544 commit 17b97c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Include/internal/pycore_stackref.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ PyStackRef_FromPyObjectImmortal(PyObject *obj)
518518

519519
#ifdef _WIN32
520520
#define PyStackRef_DUP(REF) \
521-
(PyStackRef_IsUncountedMortal(REF) ? Py_INCREF_MORTAL(BITS_TO_PTR(REF)) : (REF))
521+
(PyStackRef_IsUncountedMortal(REF) ? (Py_INCREF_MORTAL(BITS_TO_PTR(REF)), (REF)) : (REF))
522522
#else
523523
static inline _PyStackRef
524524
PyStackRef_DUP(_PyStackRef ref)

0 commit comments

Comments
 (0)