Skip to content

Commit f5b96f4

Browse files
committed
Implement C API function _PyObject_NextNotImplemented.
1 parent 6bbd996 commit f5b96f4

File tree

1 file changed

+9
-0
lines changed
  • graalpython/com.oracle.graal.python.cext/src

1 file changed

+9
-0
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -631,3 +631,12 @@ PyObject * PyObject_Bytes(PyObject *v) {
631631
}
632632
return UPCALL_CEXT_O(_jls_PyObject_Bytes, native_to_java(v));
633633
}
634+
635+
// taken from CPython 'Objects/object.c'
636+
PyObject * _PyObject_NextNotImplemented(PyObject *self) {
637+
PyErr_Format(PyExc_TypeError,
638+
"'%.200s' object is not iterable",
639+
Py_TYPE(self)->tp_name);
640+
return NULL;
641+
}
642+

0 commit comments

Comments
 (0)