mirror of
https://github.com/boostorg/python.git
synced 2026-01-19 04:22:16 +00:00
Use Py_REFCNT instead of ob_refcnt on Python 3.9 and above
This commit is contained in:
committed by
Stefan Seefeld
parent
f604eb8d0f
commit
a40bb656ee
@@ -216,7 +216,13 @@ namespace boost { namespace python { namespace detail {
|
||||
{
|
||||
for (const_iterator i = proxies.begin(); i != proxies.end(); ++i)
|
||||
{
|
||||
if ((*i)->ob_refcnt <= 0)
|
||||
if (
|
||||
#if PY_VERSION_HEX < 0x03090000
|
||||
(*i)->ob_refcnt
|
||||
#else
|
||||
Py_REFCNT(*i)
|
||||
#endif
|
||||
<= 0)
|
||||
{
|
||||
PyErr_SetString(PyExc_RuntimeError,
|
||||
"Invariant: Proxy vector in an inconsistent state");
|
||||
|
||||
Reference in New Issue
Block a user