MCPcopy Create free account
hub / github.com/Distributive-Network/PythonMonkey / JSArrayProxy_iter

Method JSArrayProxy_iter

src/JSArrayProxy.cc:582–593  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

580}
581
582PyObject *JSArrayProxyMethodDefinitions::JSArrayProxy_iter(JSArrayProxy *self) {
583 JSArrayIterProxy *iterator = PyObject_GC_New(JSArrayIterProxy, &JSArrayIterProxyType);
584 if (iterator == NULL) {
585 return NULL;
586 }
587 iterator->it.reversed = false;
588 iterator->it.it_index = 0;
589 Py_INCREF(self);
590 iterator->it.it_seq = (PyListObject *)self;
591 PyObject_GC_Track(iterator);
592 return (PyObject *)iterator;
593}
594
595PyObject *JSArrayProxyMethodDefinitions::JSArrayProxy_iter_reverse(JSArrayProxy *self) {
596 JSArrayIterProxy *iterator = PyObject_GC_New(JSArrayIterProxy, &JSArrayIterProxyType);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected