43 lines
1.5 KiB
Diff
43 lines
1.5 KiB
Diff
|
|
diff --git a/_ruamel_yaml.c b/_ruamel_yaml.c
|
||
|
|
index c81694a..587853c 100644
|
||
|
|
--- a/_ruamel_yaml.c
|
||
|
|
+++ b/_ruamel_yaml.c
|
||
|
|
@@ -496,6 +496,13 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
|
||
|
|
#ifndef PySet_CheckExact
|
||
|
|
#define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
|
||
|
|
#endif
|
||
|
|
+#if PY_VERSION_HEX >= 0x030900A4
|
||
|
|
+ #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
|
||
|
|
+ #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
|
||
|
|
+#else
|
||
|
|
+ #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj) =(refcnt)
|
||
|
|
+ #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj) = (size)
|
||
|
|
+#endif
|
||
|
|
#if CYTHON_ASSUME_SAFE_MACROS
|
||
|
|
#define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
|
||
|
|
#else
|
||
|
|
@@ -23874,9 +23881,9 @@ static void __pyx_tp_dealloc_12_ruamel_yaml_CParser(PyObject *o) {
|
||
|
|
{
|
||
|
|
PyObject *etype, *eval, *etb;
|
||
|
|
PyErr_Fetch(&etype, &eval, &etb);
|
||
|
|
- ++Py_REFCNT(o);
|
||
|
|
+ __Pyx_SET_REFCNT(o, PyREFCNT(o) + 1);
|
||
|
|
__pyx_pw_12_ruamel_yaml_7CParser_3__dealloc__(o);
|
||
|
|
- --Py_REFCNT(o);
|
||
|
|
+ __Pyx_SET_REFCNT(o, PyREFCNT(o) - 1);
|
||
|
|
PyErr_Restore(etype, eval, etb);
|
||
|
|
}
|
||
|
|
Py_CLEAR(p->stream);
|
||
|
|
@@ -24047,9 +24054,9 @@ static void __pyx_tp_dealloc_12_ruamel_yaml_CEmitter(PyObject *o) {
|
||
|
|
{
|
||
|
|
PyObject *etype, *eval, *etb;
|
||
|
|
PyErr_Fetch(&etype, &eval, &etb);
|
||
|
|
- ++Py_REFCNT(o);
|
||
|
|
+ __Pyx_SET_REFCNT(o, PyREFCNT(o) + 1);
|
||
|
|
__pyx_pw_12_ruamel_yaml_8CEmitter_3__dealloc__(o);
|
||
|
|
- --Py_REFCNT(o);
|
||
|
|
+ __Pyx_SET_REFCNT(o, PyREFCNT(o) - 1);
|
||
|
|
PyErr_Restore(etype, eval, etb);
|
||
|
|
}
|
||
|
|
Py_CLEAR(p->stream);
|