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

Function iterator_next

src/PyIterableProxyHandler.cc:124–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122static JSClass iterableIteratorClass = {"IterableIterator", JSCLASS_HAS_RESERVED_SLOTS(IterableIteratorSlotCount)};
123
124static bool iterator_next(JSContext *cx, unsigned argc, JS::Value *vp) {
125 JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
126 JS::RootedObject thisObj(cx);
127 if (!args.computeThis(cx, &thisObj)) return false;
128
129 PyObject *it = JS::GetMaybePtrFromReservedSlot<PyObject>(thisObj, IterableIteratorSlotIterableObject);
130
131 return iter_next(cx, args, it);
132}
133
134static JSFunctionSpec iterable_iterator_methods[] = {
135 JS_FN("next", iterator_next, 0, JSPROP_ENUMERATE),

Callers

nothing calls this directly

Calls 1

iter_nextFunction · 0.85

Tested by

no test coverage detected