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

Method JSObjectProxy_assign

src/JSObjectProxy.cc:189–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

187}
188
189int JSObjectProxyMethodDefinitions::JSObjectProxy_assign(JSObjectProxy *self, PyObject *key, PyObject *value)
190{
191 JS::RootedId id(GLOBAL_CX);
192 if (!keyToId(key, &id)) { // invalid key
193 PyErr_SetString(PyExc_AttributeError, "JSObjectProxy property name must be of type str or int");
194 return -1;
195 }
196
197 assignKeyValue(self, key, id, value);
198
199 return 0;
200}
201
202PyObject *JSObjectProxyMethodDefinitions::JSObjectProxy_richcompare(JSObjectProxy *self, PyObject *other, int op)
203{

Callers

nothing calls this directly

Calls 2

keyToIdFunction · 0.85
assignKeyValueFunction · 0.85

Tested by

no test coverage detected