PythonMonkey   v1.0.0 (dev)
Loading...
Searching...
No Matches
JSObjectValuesProxyMethodDefinitions Struct Reference

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

#include <JSObjectValuesProxy.hh>

Static Public Member Functions

static void JSObjectValuesProxy_dealloc (JSObjectValuesProxy *self)
 Deallocation method (.tp_dealloc), removes the reference to the underlying JSObject before freeing the JSObjectValuesProxy.
 
static int JSObjectValuesProxy_traverse (JSObjectValuesProxy *self, visitproc visit, void *arg)
 .tp_traverse method
 
static int JSObjectValuesProxy_clear (JSObjectValuesProxy *self)
 .tp_clear method
 
static Py_ssize_t JSObjectValuesProxy_length (JSObjectValuesProxy *self)
 Length method (.sq_length), returns the number of key-value pairs in the JSObject, used by the python len() method.
 
static int JSObjectValuesProxy_contains (JSObjectValuesProxy *self, PyObject *key)
 Test method (.sq_contains), returns whether a key exists, used by the in operator.
 
static PyObject * JSObjectValuesProxy_iter (JSObjectValuesProxy *self)
 Return an iterator object to make JSObjectValuesProxy iterable, emitting (key, value) tuples.
 
static PyObject * JSObjectValuesProxy_repr (JSObjectValuesProxy *self)
 Compute a string representation of the JSObjectValuesProxy.
 
static PyObject * JSObjectValuesProxy_iter_reverse (JSObjectValuesProxy *self)
 reverse iterator method
 
static PyObject * JSObjectValuesProxy_mapping (PyObject *self, void *Py_UNUSED(ignored))
 mapping method
 

Detailed Description

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

Member Function Documentation

◆ JSObjectValuesProxy_clear()

int JSObjectValuesProxyMethodDefinitions::JSObjectValuesProxy_clear ( JSObjectValuesProxy self)
static

.tp_clear method

Parameters
self- The JSObjectValuesProxy
Returns
0 on success

◆ JSObjectValuesProxy_contains()

int JSObjectValuesProxyMethodDefinitions::JSObjectValuesProxy_contains ( JSObjectValuesProxy self,
PyObject *  key 
)
static

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

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

◆ JSObjectValuesProxy_dealloc()

void JSObjectValuesProxyMethodDefinitions::JSObjectValuesProxy_dealloc ( JSObjectValuesProxy self)
static

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

Parameters
self- The JSObjectValuesProxy to be free'd

◆ JSObjectValuesProxy_iter()

PyObject * JSObjectValuesProxyMethodDefinitions::JSObjectValuesProxy_iter ( JSObjectValuesProxy self)
static

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

Parameters
self- The JSObjectValuesProxy
Returns
PyObject* - iterator object

◆ JSObjectValuesProxy_iter_reverse()

PyObject * JSObjectValuesProxyMethodDefinitions::JSObjectValuesProxy_iter_reverse ( JSObjectValuesProxy self)
static

reverse iterator method

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

◆ JSObjectValuesProxy_length()

Py_ssize_t JSObjectValuesProxyMethodDefinitions::JSObjectValuesProxy_length ( JSObjectValuesProxy 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

◆ JSObjectValuesProxy_mapping()

PyObject * JSObjectValuesProxyMethodDefinitions::JSObjectValuesProxy_mapping ( PyObject *  self,
void *  Py_UNUSEDignored 
)
static

mapping method

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

◆ JSObjectValuesProxy_repr()

PyObject * JSObjectValuesProxyMethodDefinitions::JSObjectValuesProxy_repr ( JSObjectValuesProxy self)
static

Compute a string representation of the JSObjectValuesProxy.

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

◆ JSObjectValuesProxy_traverse()

int JSObjectValuesProxyMethodDefinitions::JSObjectValuesProxy_traverse ( JSObjectValuesProxy self,
visitproc  visit,
void *  arg 
)
static

.tp_traverse method

Parameters
self- The JSObjectValuesProxy
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: