Skip to content

Commit cbdf1ce

Browse files
pilleyestefanseefeld
authored andcommitted
Use Py_REFCNT instead of ->ob_refcnt
Py_REFCNT was stabilized in 3.9, uses this official API instead of the `ob_refcnt` field that doesn't exist in the free-threaded build of 3.13.
1 parent 4fe3403 commit cbdf1ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/converter/from_python.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ namespace
222222
, char const* ref_type)
223223
{
224224
handle<> holder(source);
225-
if (source->ob_refcnt <= 1)
225+
if (Py_REFCNT(source) <= 1)
226226
{
227227
handle<> msg(
228228
#if PY_VERSION_HEX >= 0x3000000

0 commit comments

Comments
 (0)