Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion pandas/_libs/internals.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1006,8 +1006,11 @@ cdef class BlockValuesRefs:

cdef extern from "Python.h":
"""
// python version < 3.14
#if PY_VERSION_HEX < 0x030E0000
int __Pyx_PyUnstable_Object_IsUniqueReferencedTemporary(PyObject *ref);
int __Pyx_PyUnstable_Object_IsUniqueReferencedTemporary(PyObject *ref) {
return Py_REFCNT(ref) == 1;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a comment here that this is unused and just added to avoid a build warning?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

I actually had to define it to prevent import errors in debug builds. When you build with optimizations, the compiler removes the declaration, but debug builds has this symbol undefined, which causes import errors.

}
#else
#define __Pyx_PyUnstable_Object_IsUniqueReferencedTemporary \
PyUnstable_Object_IsUniqueReferencedTemporary
Expand Down
Loading