File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
graalpython/com.oracle.graal.python.cext Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,12 @@ PyAPI_FUNC(PyObject **) PyTruffleTuple_GetItems(PyObject *op);
41
41
42
42
// GraalPy change: Export PyTuple_SET_ITEM as regular API function to use in PyO3 and others
43
43
PyAPI_FUNC (void ) PyTuple_SET_ITEM (PyObject * , Py_ssize_t , PyObject * );
44
+
45
+ /* Inline function to be used in the PyTuple_SET_ITEM macro. */
46
+ static inline void graalpy_tuple_set_item (PyObject * op , Py_ssize_t index , PyObject * value ) {
47
+ PyTruffleTuple_GetItems (op )[index ] = value ;
48
+ }
44
49
#define PyTuple_SET_ITEM (op , index , value ) \
45
- PyTuple_SET_ITEM (_PyObject_CAST(op), (index), _PyObject_CAST(value))
50
+ graalpy_tuple_set_item (_PyObject_CAST(op), (index), _PyObject_CAST(value))
46
51
47
52
PyAPI_FUNC (void ) _PyTuple_DebugMallocStats (FILE * out );
Original file line number Diff line number Diff line change @@ -1428,5 +1428,5 @@ _PyTuple_GET_ITEM(PyObject* a, Py_ssize_t b) {
1428
1428
#undef PyTuple_SET_ITEM
1429
1429
// Export PyTuple_SET_ITEM as regular API function to use in PyO3 and others
1430
1430
void PyTuple_SET_ITEM (PyObject * op , Py_ssize_t index , PyObject * value ) {
1431
- PyTruffleTuple_GetItems (op )[ index ] = value ;
1431
+ graalpy_tuple_set_item (op , index , value ) ;
1432
1432
}
You can’t perform that action at this time.
0 commit comments