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

Function idToIndex

src/PyBaseProxyHandler.cc:35–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33}
34
35bool idToIndex(JSContext *cx, JS::HandleId id, Py_ssize_t *index) {
36 if (id.isInt()) { // int-like strings have already been automatically converted to ints
37 *index = id.toInt();
38 return true;
39 } else {
40 return false; // fail
41 }
42}
43
44bool PyBaseProxyHandler::getPrototypeIfOrdinary(JSContext *cx, JS::HandleObject proxy,
45 bool *isOrdinary,

Callers 4

definePropertyMethod · 0.85
delete_Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected