static inline Py_ssize_t PyList_GET_SIZE(PyListObject *op) {
return Py_SIZE(op);
}
-#define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyList_CAST(op))
+#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000
+# define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyList_CAST(op))
+#endif
#define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[index])
PyList_SET_ITEM(PyListObject *op, Py_ssize_t index, PyObject *value) {
op->ob_item[index] = value;
}
+#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000
#define PyList_SET_ITEM(op, index, value) \
PyList_SET_ITEM(_PyList_CAST(op), index, _PyObject_CAST(value))
+#endif
static inline Py_ssize_t PyTuple_GET_SIZE(PyTupleObject *op) {
return Py_SIZE(op);
}
-#define PyTuple_GET_SIZE(op) PyTuple_GET_SIZE(_PyTuple_CAST(op))
+#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000
+# define PyTuple_GET_SIZE(op) PyTuple_GET_SIZE(_PyTuple_CAST(op))
+#endif
#define PyTuple_GET_ITEM(op, index) (_PyTuple_CAST(op)->ob_item[index])
PyTuple_SET_ITEM(PyTupleObject *op, Py_ssize_t index, PyObject *value) {
op->ob_item[index] = value;
}
+#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000
#define PyTuple_SET_ITEM(op, index, value) \
PyTuple_SET_ITEM(_PyTuple_CAST(op), index, _PyObject_CAST(value))
+#endif
PyAPI_FUNC(void) _PyTuple_DebugMallocStats(FILE *out);
}
return Py_None;
}
-#define PyWeakref_GET_OBJECT(ref) PyWeakref_GET_OBJECT(_PyObject_CAST(ref))
+#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000
+# define PyWeakref_GET_OBJECT(ref) PyWeakref_GET_OBJECT(_PyObject_CAST(ref))
+#endif