mirror of
https://github.com/boostorg/python.git
synced 2026-01-19 04:22:16 +00:00
Conditionally use Py_REFCNT
This commit is contained in:
committed by
Stefan Seefeld
parent
cbdf1ce2a1
commit
3e7be69e1e
@@ -222,7 +222,13 @@ namespace
|
||||
, char const* ref_type)
|
||||
{
|
||||
handle<> holder(source);
|
||||
if (Py_REFCNT(source) <= 1)
|
||||
if (
|
||||
#if PY_VERSION_HEX < 0x03090000
|
||||
source->ob_refcnt
|
||||
#else
|
||||
Py_REFCNT(source)
|
||||
#endif
|
||||
<= 1)
|
||||
{
|
||||
handle<> msg(
|
||||
#if PY_VERSION_HEX >= 0x3000000
|
||||
|
||||
Reference in New Issue
Block a user