PythonMonkey v1.1.1 (dev)
|
This struct is a bundle of methods used by the JSObjectProxy type. More...
#include <JSObjectProxy.hh>
Static Public Member Functions | |
static void | JSObjectProxy_dealloc (JSObjectProxy *self) |
Deallocation method (.tp_dealloc), removes the reference to the underlying JSObject before freeing the JSObjectProxy. | |
static Py_ssize_t | JSObjectProxy_length (JSObjectProxy *self) |
Length method (.mp_length), returns the number of key-value pairs in the JSObject, used by the python len() method. | |
static PyObject * | JSObjectProxy_get (JSObjectProxy *self, PyObject *key) |
Getter method, returns a value from the JSObjectProxy given a key, used by several built-in python methods as well as the . operator. | |
static PyObject * | JSObjectProxy_get_subscript (JSObjectProxy *self, PyObject *key) |
Getter method (.mp_subscript), returns a value from the JSObjectProxy given a key, used by the [] operator. | |
static int | JSObjectProxy_contains (JSObjectProxy *self, PyObject *key) |
Test method (.sq_contains), returns whether a key exists, used by the in operator. | |
static int | JSObjectProxy_assign (JSObjectProxy *self, PyObject *key, PyObject *value) |
Assign method (.mp_ass_subscript), assigns a key-value pair if value is non-NULL, or deletes a key-value pair if value is NULL. | |
static PyObject * | JSObjectProxy_richcompare (JSObjectProxy *self, PyObject *other, int op) |
Comparison method (.tp_richcompare), returns appropriate boolean given a comparison operator and other pyobject. | |
static bool | JSObjectProxy_richcompare_helper (JSObjectProxy *self, PyObject *other, std::unordered_map< PyObject *, PyObject * > &visited) |
Helper function for JSObjectProxy_richcompare. | |
static PyObject * | JSObjectProxy_iter (JSObjectProxy *self) |
Return an iterator object to make JSObjectProxy iterable, emitting (key, value) tuples. | |
static PyObject * | JSObjectProxy_iter_next (JSObjectProxy *self) |
Implements next operator function. | |
static PyObject * | JSObjectProxy_repr (JSObjectProxy *self) |
Compute a string representation of the JSObjectProxy. | |
static PyObject * | JSObjectProxy_or (JSObjectProxy *self, PyObject *other) |
Set union operation. | |
static PyObject * | JSObjectProxy_ior (JSObjectProxy *self, PyObject *other) |
Set union operation, in place. | |
static PyObject * | JSObjectProxy_get_method (JSObjectProxy *self, PyObject *const *args, Py_ssize_t nargs) |
get method | |
static PyObject * | JSObjectProxy_setdefault_method (JSObjectProxy *self, PyObject *const *args, Py_ssize_t nargs) |
setdefault method | |
static PyObject * | JSObjectProxy_pop_method (JSObjectProxy *self, PyObject *const *args, Py_ssize_t nargs) |
pop method | |
static PyObject * | JSObjectProxy_clear_method (JSObjectProxy *self) |
clear method | |
static PyObject * | JSObjectProxy_copy_method (JSObjectProxy *self) |
copy method | |
static PyObject * | JSObjectProxy_update_method (JSObjectProxy *self, PyObject *args, PyObject *kwds) |
update method update the dict with another dict or iterable | |
static PyObject * | JSObjectProxy_keys_method (JSObjectProxy *self) |
keys method | |
static PyObject * | JSObjectProxy_values_method (JSObjectProxy *self) |
values method | |
static PyObject * | JSObjectProxy_items_method (JSObjectProxy *self) |
items method | |
static int | JSObjectProxy_traverse (JSObjectProxy *self, visitproc visit, void *arg) |
tp_traverse | |
static int | JSObjectProxy_clear (JSObjectProxy *self) |
tp_clear | |
This struct is a bundle of methods used by the JSObjectProxy type.
|
static |
Assign method (.mp_ass_subscript), assigns a key-value pair if value is non-NULL, or deletes a key-value pair if value is NULL.
self | - The JSObjectProxy |
key | - The key to be set or deleted |
value | If NULL, the key-value pair is deleted, if not NULL then a key-value pair is assigned |
|
static |
|
static |
|
static |
Test method (.sq_contains), returns whether a key exists, used by the in operator.
self | - The JSObjectProxy |
key | - The key for the value in the JSObjectProxy |
key
is in dict, 0 if not, and -1 on error
|
static |
|
static |
Deallocation method (.tp_dealloc), removes the reference to the underlying JSObject before freeing the JSObjectProxy.
self | - The JSObjectProxy to be free'd |
|
static |
Getter method, returns a value from the JSObjectProxy given a key, used by several built-in python methods as well as the . operator.
self | - The JSObjectProxy |
key | - The key for the value in the JSObjectProxy |
|
static |
get method
self | - The JSObjectProxy |
args | - arguments to the method |
nargs | - number of args to the method |
|
static |
Getter method (.mp_subscript), returns a value from the JSObjectProxy given a key, used by the [] operator.
self | - The JSObjectProxy |
key | - The key for the value in the JSObjectProxy |
|
static |
Set union operation, in place.
self | - The JSObjectProxy |
other | - The other PyObject to be or'd, expected to be dict or JSObjectProxy |
|
static |
|
static |
Return an iterator object to make JSObjectProxy iterable, emitting (key, value) tuples.
self | - The JSObjectProxy |
|
static |
Implements next operator function.
self | - The JSObjectProxy |
|
static |
|
static |
Length method (.mp_length), returns the number of key-value pairs in the JSObject, used by the python len() method.
self | - The JSObjectProxy |
|
static |
Set union operation.
self | - The JSObjectProxy |
other | - The other PyObject to be or'd, expected to be dict or JSObjectProxy |
|
static |
pop method
self | - The JSObjectProxy |
args | - arguments to the method |
nargs | - number of args to the method |
|
static |
Compute a string representation of the JSObjectProxy.
self | - The JSObjectProxy |
|
static |
Comparison method (.tp_richcompare), returns appropriate boolean given a comparison operator and other pyobject.
self | - The JSObjectProxy |
other | - Any other PyObject |
op | - Which boolean operator is being performed (Py_EQ for equality, Py_NE for inequality, all other operators are not implemented) |
|
static |
Helper function for JSObjectProxy_richcompare.
self | - The PyObject on the left side of the operator (guaranteed to be a JSObjectProxy *) |
other | - The PyObject on the right side of the operator |
visited |
|
static |
setdefault method
self | - The JSObjectProxy |
args | - arguments to the method |
nargs | - number of args to the method |
|
static |
tp_traverse
self | - The JSObjectProxy |
visit | - The function to be applied on each element of the object |
arg | - The argument to the visit function |
|
static |
update method update the dict with another dict or iterable
self | - The JSObjectProxy |
args | - arguments to the sort method |
kwds | - keyword arguments to the sort method (key-value pairs to be updated in the dict) |
|
static |