File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,13 +33,17 @@ PyAPI_FUNC(void) _PyList_DebugMallocStats(FILE *out);
3333static inline Py_ssize_t PyList_GET_SIZE (PyListObject * op ) {
3434 return Py_SIZE (op );
3535}
36- #define PyList_GET_SIZE (op ) PyList_GET_SIZE(_PyList_CAST(op))
36+ #if !defined(Py_LIMITED_API ) || Py_LIMITED_API + 0 < 0x030b0000
37+ # define PyList_GET_SIZE (op ) PyList_GET_SIZE(_PyList_CAST(op))
38+ #endif
3739
3840#define PyList_GET_ITEM (op , index ) (_PyList_CAST(op)->ob_item[index])
3941
4042static inline void
4143PyList_SET_ITEM (PyListObject * op , Py_ssize_t index , PyObject * value ) {
4244 op -> ob_item [index ] = value ;
4345}
46+ #if !defined(Py_LIMITED_API ) || Py_LIMITED_API + 0 < 0x030b0000
4447#define PyList_SET_ITEM (op , index , value ) \
4548 PyList_SET_ITEM(_PyList_CAST(op), index, _PyObject_CAST(value))
49+ #endif
Original file line number Diff line number Diff line change @@ -22,7 +22,9 @@ PyAPI_FUNC(void) _PyTuple_MaybeUntrack(PyObject *);
2222static inline Py_ssize_t PyTuple_GET_SIZE (PyTupleObject * op ) {
2323 return Py_SIZE (op );
2424}
25- #define PyTuple_GET_SIZE (op ) PyTuple_GET_SIZE(_PyTuple_CAST(op))
25+ #if !defined(Py_LIMITED_API ) || Py_LIMITED_API + 0 < 0x030b0000
26+ # define PyTuple_GET_SIZE (op ) PyTuple_GET_SIZE(_PyTuple_CAST(op))
27+ #endif
2628
2729#define PyTuple_GET_ITEM (op , index ) (_PyTuple_CAST(op)->ob_item[index])
2830
@@ -31,7 +33,9 @@ static inline void
3133PyTuple_SET_ITEM (PyTupleObject * op , Py_ssize_t index , PyObject * value ) {
3234 op -> ob_item [index ] = value ;
3335}
36+ #if !defined(Py_LIMITED_API ) || Py_LIMITED_API + 0 < 0x030b0000
3437#define PyTuple_SET_ITEM (op , index , value ) \
3538 PyTuple_SET_ITEM(_PyTuple_CAST(op), index, _PyObject_CAST(value))
39+ #endif
3640
3741PyAPI_FUNC (void ) _PyTuple_DebugMallocStats (FILE * out );
Original file line number Diff line number Diff line change @@ -51,4 +51,6 @@ static inline PyObject* PyWeakref_GET_OBJECT(PyObject *ref_obj) {
5151 }
5252 return Py_None ;
5353}
54- #define PyWeakref_GET_OBJECT (ref ) PyWeakref_GET_OBJECT(_PyObject_CAST(ref))
54+ #if !defined(Py_LIMITED_API ) || Py_LIMITED_API + 0 < 0x030b0000
55+ # define PyWeakref_GET_OBJECT (ref ) PyWeakref_GET_OBJECT(_PyObject_CAST(ref))
56+ #endif
You can’t perform that action at this time.
0 commit comments