diff --git a/src/hyperscan/extension.c b/src/hyperscan/extension.c index e072d10..68f099e 100644 --- a/src/hyperscan/extension.c +++ b/src/hyperscan/extension.c @@ -9,6 +9,14 @@ #include #include +#if PY_VERSION_HEX < 0x030A0000 +static inline PyObject *Py_NewRef(PyObject *obj) +{ + Py_INCREF(obj); + return obj; +} +#endif + #ifdef Py_GIL_DISABLED typedef struct { PyThread_type_lock lock;