Skip to content

Commit fcffde9

Browse files
authored
BUG: define __Pyx_PyUnstable_Object_IsUniqueReferencedTemporary for python<3.14 (#63129)
1 parent abeba1b commit fcffde9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pandas/_libs/internals.pyx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1006,8 +1006,12 @@ cdef class BlockValuesRefs:
10061006

10071007
cdef extern from "Python.h":
10081008
"""
1009+
// python version < 3.14
10091010
#if PY_VERSION_HEX < 0x030E0000
1010-
int __Pyx_PyUnstable_Object_IsUniqueReferencedTemporary(PyObject *ref);
1011+
// This function is unused and is declared to avoid a build warning
1012+
int __Pyx_PyUnstable_Object_IsUniqueReferencedTemporary(PyObject *ref) {
1013+
return Py_REFCNT(ref) == 1;
1014+
}
10111015
#else
10121016
#define __Pyx_PyUnstable_Object_IsUniqueReferencedTemporary \
10131017
PyUnstable_Object_IsUniqueReferencedTemporary

0 commit comments

Comments
 (0)