2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-19 04:22:16 +00:00

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.
This commit is contained in:
Aditya Pillai
2025-03-10 14:03:41 -04:00
committed by Stefan Seefeld
parent 4fe3403584
commit cbdf1ce2a1

View File

@@ -222,7 +222,7 @@ namespace
, char const* ref_type)
{
handle<> holder(source);
if (source->ob_refcnt <= 1)
if (Py_REFCNT(source) <= 1)
{
handle<> msg(
#if PY_VERSION_HEX >= 0x3000000