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

Function array_valueOf

src/PyListProxyHandler.cc:1607–1619  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1605}
1606
1607static bool array_valueOf(JSContext *cx, unsigned argc, JS::Value *vp) {
1608 JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
1609
1610 JS::RootedObject proxy(cx, JS::ToObject(cx, args.thisv()));
1611 if (!proxy) {
1612 return false;
1613 }
1614 PyObject *self = JS::GetMaybePtrFromReservedSlot<PyObject>(proxy, PyObjectSlot);
1615
1616 // return ref to self
1617 args.rval().set(jsTypeFactory(cx, self));
1618 return true;
1619}
1620
1621
1622////// Sorting

Callers

nothing calls this directly

Calls 2

jsTypeFactoryFunction · 0.85
setMethod · 0.65

Tested by

no test coverage detected