summaryrefslogtreecommitdiffstats
path: root/Objects/object.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/object.c')
-rw-r--r--Objects/object.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/Objects/object.c b/Objects/object.c
index 0a8621b..0845966 100644
--- a/Objects/object.c
+++ b/Objects/object.c
@@ -13,6 +13,11 @@
#include "frameobject.h"
#include "interpreteridobject.h"
+#ifdef Py_LIMITED_API
+ // Prevent recursive call _Py_IncRef() <=> Py_INCREF()
+# error "Py_LIMITED_API macro must not be defined"
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -136,6 +141,18 @@ Py_DecRef(PyObject *o)
Py_XDECREF(o);
}
+void
+_Py_IncRef(PyObject *o)
+{
+ Py_INCREF(o);
+}
+
+void
+_Py_DecRef(PyObject *o)
+{
+ Py_DECREF(o);
+}
+
PyObject *
PyObject_Init(PyObject *op, PyTypeObject *tp)
{