Skip to content

Commit 4253174

Browse files
committed
Remove GraalPyPrivate_Sequence_ITEM
1 parent 26e7584 commit 4253174

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

graalpython/com.oracle.graal.python.cext/include/cpython/abstract.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,13 +165,10 @@ PyAPI_FUNC(Py_ssize_t) PyObject_LengthHint(PyObject *o, Py_ssize_t);
165165

166166
/* === Sequence protocol ================================================ */
167167

168-
// GraalPy-specific
169-
PyAPI_FUNC(PyObject*) GraalPyPrivate_Sequence_ITEM(PyObject* obj, Py_ssize_t index);
170-
171168
/* Assume tp_as_sequence and sq_item exist and that 'i' does not
172169
need to be corrected for a negative index. */
173-
// GraalPy change
174-
#define PySequence_ITEM(o, i) GraalPyPrivate_Sequence_ITEM((o), (i))
170+
#define PySequence_ITEM(o, i)\
171+
( Py_TYPE(o)->tp_as_sequence->sq_item((o), (i)) )
175172

176173
#define PY_ITERSEARCH_COUNT 1
177174
#define PY_ITERSEARCH_INDEX 2

graalpython/com.oracle.graal.python.cext/src/abstract.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3042,12 +3042,3 @@ _Py_FreeCharPArray(char *const array[])
30423042
PyMem_Free((void*)array);
30433043
}
30443044
#endif // GraalPy change
3045-
3046-
// GraalPy additions
3047-
3048-
PyObject*
3049-
GraalPyPrivate_Sequence_ITEM(PyObject* obj, Py_ssize_t index)
3050-
{
3051-
PySequenceMethods* methods = Py_TYPE(obj)->tp_as_sequence;
3052-
return methods->sq_item(obj, index);
3053-
}

0 commit comments

Comments
 (0)