File tree 3 files changed +13
-3
lines changed
3 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -33,13 +33,17 @@ PyAPI_FUNC(void) _PyList_DebugMallocStats(FILE *out);
33
33
static inline Py_ssize_t PyList_GET_SIZE (PyListObject * op ) {
34
34
return Py_SIZE (op );
35
35
}
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
37
39
38
40
#define PyList_GET_ITEM (op , index ) (_PyList_CAST(op)->ob_item[index])
39
41
40
42
static inline void
41
43
PyList_SET_ITEM (PyListObject * op , Py_ssize_t index , PyObject * value ) {
42
44
op -> ob_item [index ] = value ;
43
45
}
46
+ #if !defined(Py_LIMITED_API ) || Py_LIMITED_API + 0 < 0x030b0000
44
47
#define PyList_SET_ITEM (op , index , value ) \
45
48
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 *);
22
22
static inline Py_ssize_t PyTuple_GET_SIZE (PyTupleObject * op ) {
23
23
return Py_SIZE (op );
24
24
}
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
26
28
27
29
#define PyTuple_GET_ITEM (op , index ) (_PyTuple_CAST(op)->ob_item[index])
28
30
@@ -31,7 +33,9 @@ static inline void
31
33
PyTuple_SET_ITEM (PyTupleObject * op , Py_ssize_t index , PyObject * value ) {
32
34
op -> ob_item [index ] = value ;
33
35
}
36
+ #if !defined(Py_LIMITED_API ) || Py_LIMITED_API + 0 < 0x030b0000
34
37
#define PyTuple_SET_ITEM (op , index , value ) \
35
38
PyTuple_SET_ITEM(_PyTuple_CAST(op), index, _PyObject_CAST(value))
39
+ #endif
36
40
37
41
PyAPI_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) {
51
51
}
52
52
return Py_None ;
53
53
}
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