From d1f4be7305ddcae6b2dbb484e288c3eed71de106 Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 26 Aug 2025 14:19:27 +0200 Subject: [PATCH] py_compat: Add PyUnstable_Object_IsUniquelyReferenced --- dtool/src/interrogatedb/py_compat.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dtool/src/interrogatedb/py_compat.h b/dtool/src/interrogatedb/py_compat.h index 70c8b43e91..efbdc74d83 100644 --- a/dtool/src/interrogatedb/py_compat.h +++ b/dtool/src/interrogatedb/py_compat.h @@ -368,6 +368,12 @@ PyDict_GetItemStringRef(PyObject *mp, const char *key, PyObject **result) { # define Py_END_CRITICAL_SECTION2() } #endif +/* Python 3.14 */ + +#if PY_VERSION_HEX < 0x030E00A8 +# define PyUnstable_Object_IsUniquelyReferenced(op) (Py_REFCNT((op)) == 1) +#endif + /* Other Python implementations */ #endif // HAVE_PYTHON