11#ifndef PythonMonkey_PyBaseProxy_
12#define PythonMonkey_PyBaseProxy_
15#include <jsfriendapi.h>
16#include <js/Conversions.h>
28 bool getPrototypeIfOrdinary(JSContext *cx, JS::HandleObject proxy,
bool *isOrdinary, JS::MutableHandleObject protop)
const override final;
29 bool preventExtensions(JSContext *cx, JS::HandleObject proxy, JS::ObjectOpResult &result)
const override final;
30 bool isExtensible(JSContext *cx, JS::HandleObject proxy,
bool *extensible)
const override final;
44PyObject *
idToKey(JSContext *cx, JS::HandleId
id);
49bool keyToId(PyObject *key, JS::MutableHandleId idp);
51bool idToIndex(JSContext *cx, JS::HandleId
id, Py_ssize_t *index);
ProxySlots
Definition PyBaseProxyHandler.hh:33
@ OtherSlot
Definition PyBaseProxyHandler.hh:33
@ PyObjectSlot
Definition PyBaseProxyHandler.hh:33
PyObject * idToKey(JSContext *cx, JS::HandleId id)
Convert jsid to a PyObject to be used as dict keys.
Definition PyBaseProxyHandler.cc:19
bool keyToId(PyObject *key, JS::MutableHandleId idp)
Convert Python dict key to jsid.
Definition JSObjectProxy.cc:35
bool idToIndex(JSContext *cx, JS::HandleId id, Py_ssize_t *index)
Definition PyBaseProxyHandler.cc:35
Definition PyBaseProxyHandler.hh:35
const char * name
Definition PyBaseProxyHandler.hh:36
JSNative call
Definition PyBaseProxyHandler.hh:37
uint16_t nargs
Definition PyBaseProxyHandler.hh:38
base class for PyDictProxyHandler and PyListProxyHandler
Definition PyBaseProxyHandler.hh:24
PyBaseProxyHandler(const void *family)
Definition PyBaseProxyHandler.hh:26
bool preventExtensions(JSContext *cx, JS::HandleObject proxy, JS::ObjectOpResult &result) const override final
Definition PyBaseProxyHandler.cc:53
bool isExtensible(JSContext *cx, JS::HandleObject proxy, bool *extensible) const override final
Definition PyBaseProxyHandler.cc:59
bool getPrototypeIfOrdinary(JSContext *cx, JS::HandleObject proxy, bool *isOrdinary, JS::MutableHandleObject protop) const override final
Definition PyBaseProxyHandler.cc:44