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

Method set

src/PyBytesProxyHandler.cc:256–269  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

254
255
256bool PyBytesProxyHandler::set(JSContext *cx, JS::HandleObject proxy, JS::HandleId id,
257 JS::HandleValue v, JS::HandleValue receiver,
258 JS::ObjectOpResult &result) const {
259
260 // block all modifications
261
262 PyObject *self = JS::GetMaybePtrFromReservedSlot<PyObject>(proxy, PyObjectSlot);
263
264 PyErr_Format(PyExc_TypeError,
265 "'%.100s' object has only read-only attributes",
266 Py_TYPE(self)->tp_name);
267
268 return result.failReadOnly();
269}
270
271bool PyBytesProxyHandler::getOwnPropertyDescriptor(
272 JSContext *cx, JS::HandleObject proxy, JS::HandleId id,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected