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

Method JSObjectProxy_length

src/JSObjectProxy.cc:72–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70}
71
72Py_ssize_t JSObjectProxyMethodDefinitions::JSObjectProxy_length(JSObjectProxy *self)
73{
74 JS::RootedIdVector props(GLOBAL_CX);
75 if (!js::GetPropertyKeys(GLOBAL_CX, *(self->jsObject), JSITER_OWNONLY, &props))
76 {
77 PyErr_Format(PyExc_SystemError, "%s JSAPI call failed", JSObjectProxyType.tp_name);
78 return -1;
79 }
80 return props.length();
81}
82
83static inline PyObject *getKey(JSObjectProxy *self, PyObject *key, JS::HandleId id, bool checkPropertyShadowsMethod) {
84 // look through the methods for dispatch

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected