PythonMonkey   v0.9.1 (dev)
Loading...
Searching...
No Matches
JSObjectKeysProxyMethodDefinitions Struct Reference

This struct is a bundle of methods used by the JSObjectKeysProxy type. More...

#include <JSObjectKeysProxy.hh>

Static Public Member Functions

static void JSObjectKeysProxy_dealloc (JSObjectKeysProxy *self)
 Deallocation method (.tp_dealloc), removes the reference to the underlying JSObject before freeing the JSObjectKeysProxy.
 
static int JSObjectKeysProxy_traverse (JSObjectKeysProxy *self, visitproc visit, void *arg)
 .tp_traverse method
 
static int JSObjectKeysProxy_clear (JSObjectKeysProxy *self)
 .tp_clear method
 
static Py_ssize_t JSObjectKeysProxy_length (JSObjectKeysProxy *self)
 Length method (.sq_length), returns the number of key-value pairs in the JSObject, used by the python len() method.
 
static int JSObjectKeysProxy_contains (JSObjectKeysProxy *self, PyObject *key)
 Test method (.sq_contains), returns whether a key exists, used by the in operator.
 
static PyObject * JSObjectKeysProxy_richcompare (JSObjectKeysProxy *self, PyObject *other, int op)
 Comparison method (.tp_richcompare), returns appropriate boolean given a comparison operator and other pyobject.
 
static PyObject * JSObjectKeysProxy_iter (JSObjectKeysProxy *self)
 Return an iterator object to make JSObjectKeysProxy iterable, emitting (key, value) tuples.
 
static PyObject * JSObjectKeysProxy_repr (JSObjectKeysProxy *self)
 Compute a string representation of the JSObjectKeysProxy.
 
static PyObject * JSObjectKeysProxy_intersect (JSObjectKeysProxy *self, PyObject *other)
 Set intersect operation.
 
static PyObject * JSObjectKeysProxy_isDisjoint (JSObjectKeysProxy *self, PyObject *other)
 Set disjoint method.
 
static PyObject * JSObjectKeysProxy_iter_reverse (JSObjectKeysProxy *self)
 reverse iterator method
 
static PyObject * JSObjectKeysProxy_mapping (PyObject *self, void *Py_UNUSED(ignored))
 mapping method
 

Detailed Description

This struct is a bundle of methods used by the JSObjectKeysProxy type.

Member Function Documentation

◆ JSObjectKeysProxy_clear()

int JSObjectKeysProxyMethodDefinitions::JSObjectKeysProxy_clear ( JSObjectKeysProxy self)
static

.tp_clear method

Parameters
self- The JSObjectKeysProxy
Returns
0 on success

◆ JSObjectKeysProxy_contains()

int JSObjectKeysProxyMethodDefinitions::JSObjectKeysProxy_contains ( JSObjectKeysProxy self,
PyObject *  key 
)
static

Test method (.sq_contains), returns whether a key exists, used by the in operator.

Parameters
self- The JSObjectKeysProxy
key- The key for the value in the JSObjectKeysProxy
Returns
int 1 if key is in dict, 0 if not, and -1 on error

◆ JSObjectKeysProxy_dealloc()

void JSObjectKeysProxyMethodDefinitions::JSObjectKeysProxy_dealloc ( JSObjectKeysProxy self)
static

Deallocation method (.tp_dealloc), removes the reference to the underlying JSObject before freeing the JSObjectKeysProxy.

Parameters
self- The JSObjectKeysProxy to be free'd

◆ JSObjectKeysProxy_intersect()

PyObject * JSObjectKeysProxyMethodDefinitions::JSObjectKeysProxy_intersect ( JSObjectKeysProxy self,
PyObject *  other 
)
static

Set intersect operation.

Parameters
self- The JSObjectKeysProxy
other- The other PyObject to be and'd, expected to be dict or JSObjectKeysProxy
Returns
PyObject* The resulting new dict

◆ JSObjectKeysProxy_isDisjoint()

PyObject * JSObjectKeysProxyMethodDefinitions::JSObjectKeysProxy_isDisjoint ( JSObjectKeysProxy self,
PyObject *  other 
)
static

Set disjoint method.

Parameters
self- The JSObjectKeysProxy
other- The other PyObject to be and'd, expected to be dict or JSObjectKeysProxy
Returns
PyObject* The resulting new dict

◆ JSObjectKeysProxy_iter()

PyObject * JSObjectKeysProxyMethodDefinitions::JSObjectKeysProxy_iter ( JSObjectKeysProxy self)
static

Return an iterator object to make JSObjectKeysProxy iterable, emitting (key, value) tuples.

Parameters
self- The JSObjectKeysProxy
Returns
PyObject* - iterator object

◆ JSObjectKeysProxy_iter_reverse()

PyObject * JSObjectKeysProxyMethodDefinitions::JSObjectKeysProxy_iter_reverse ( JSObjectKeysProxy self)
static

reverse iterator method

Parameters
self- The JSObjectKeysProxy
Returns
PyObject* The resulting new dict

◆ JSObjectKeysProxy_length()

Py_ssize_t JSObjectKeysProxyMethodDefinitions::JSObjectKeysProxy_length ( JSObjectKeysProxy self)
static

Length method (.sq_length), returns the number of key-value pairs in the JSObject, used by the python len() method.

Parameters
self- The JSObjectProxy
Returns
Py_ssize_t The length of the JSObjectProxy

◆ JSObjectKeysProxy_mapping()

PyObject * JSObjectKeysProxyMethodDefinitions::JSObjectKeysProxy_mapping ( PyObject *  self,
void *  Py_UNUSEDignored 
)
static

mapping method

Parameters
self- The JSObjectKeysProxy
Py_UNUSED
Returns
PyObject* The resulting new dict

◆ JSObjectKeysProxy_repr()

PyObject * JSObjectKeysProxyMethodDefinitions::JSObjectKeysProxy_repr ( JSObjectKeysProxy self)
static

Compute a string representation of the JSObjectKeysProxy.

Parameters
self- The JSObjectKeysProxy
Returns
the string representation (a PyUnicodeObject) on success, NULL on failure

◆ JSObjectKeysProxy_richcompare()

PyObject * JSObjectKeysProxyMethodDefinitions::JSObjectKeysProxy_richcompare ( JSObjectKeysProxy self,
PyObject *  other,
int  op 
)
static

Comparison method (.tp_richcompare), returns appropriate boolean given a comparison operator and other pyobject.

Parameters
self- The JSObjectKeysProxy
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)
Returns
PyObject* - True or false depending on result of comparison

◆ JSObjectKeysProxy_traverse()

int JSObjectKeysProxyMethodDefinitions::JSObjectKeysProxy_traverse ( JSObjectKeysProxy self,
visitproc  visit,
void *  arg 
)
static

.tp_traverse method

Parameters
self- The JSObjectKeysProxy
visit- The function to be applied on each element of the list
arg- The argument to the visit function
Returns
0 on success

The documentation for this struct was generated from the following files: