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

Function DefineListIterator

src/PyListProxyHandler.cc:1888–1904  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1886}
1887
1888static bool DefineListIterator(JSContext *cx, JS::HandleObject global) {
1889 JS::RootedObject iteratorPrototype(cx);
1890 if (!JS_GetClassPrototype(cx, JSProto_Iterator, &iteratorPrototype)) {
1891 return false;
1892 }
1893
1894 JS::RootedObject protoObj(cx,
1895 JS_InitClass(cx, global,
1896 nullptr, iteratorPrototype,
1897 "ListIterator",
1898 ListIteratorConstructor, 0,
1899 nullptr, list_iterator_methods,
1900 nullptr, nullptr)
1901 );
1902
1903 return protoObj; // != nullptr
1904}
1905
1906// private util
1907static bool array_iterator_func(JSContext *cx, unsigned argc, JS::Value *vp, int itemKind) {

Callers 1

array_iterator_funcFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected