PythonMonkey   v0.8.2 (dev)
Loading...
Searching...
No Matches
PyBaseProxyHandler.hh File Reference

Structs for creating JS proxy objects. More...

#include <jsapi.h>
#include <jsfriendapi.h>
#include <js/Conversions.h>
#include <js/Proxy.h>
#include <Python.h>
Include dependency graph for PyBaseProxyHandler.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  PyBaseProxyHandler
 base class for PyDictProxyHandler and PyListProxyHandler More...
 
struct  JSMethodDef
 

Enumerations

enum  ProxySlots { PyObjectSlot , OtherSlot }
 

Functions

PyObject * idToKey (JSContext *cx, JS::HandleId id)
 Convert jsid to a PyObject to be used as dict keys.
 
bool keyToId (PyObject *key, JS::MutableHandleId idp)
 Convert Python dict key to jsid.
 
bool idToIndex (JSContext *cx, JS::HandleId id, Py_ssize_t *index)
 

Detailed Description

Structs for creating JS proxy objects.

Author
Caleb Aikens (caleb.nosp@m.@dis.nosp@m.tribu.nosp@m.tive.nosp@m..netw.nosp@m.ork) and Philippe Laporte (phili.nosp@m.ppe@.nosp@m.distr.nosp@m.ibut.nosp@m.ive.n.nosp@m.etwo.nosp@m.rk)
Date
2023-04-20

Enumeration Type Documentation

◆ ProxySlots

enum ProxySlots
Enumerator
PyObjectSlot 
OtherSlot 

Function Documentation

◆ idToIndex()

bool idToIndex ( JSContext *  cx,
JS::HandleId  id,
Py_ssize_t *  index 
)

◆ idToKey()

PyObject * idToKey ( JSContext *  cx,
JS::HandleId  id 
)

Convert jsid to a PyObject to be used as dict keys.

◆ keyToId()

bool keyToId ( PyObject *  key,
JS::MutableHandleId  idp 
)

Convert Python dict key to jsid.