parrotcode: Python List | |
Contents | Dynamic PMCs |
classes/pylist.pmc - Python List
These are the vtable functions for the PyList base class
void init()
list_new()
function.PMC* "__new__"(PMC *class, PMC *source)
PMC* "__getitem__"(PMC *self, PMC *idx)
key
.PMC* "__setitem__"(PMC *self, PMC *idx, PMC *value)
idx
to *value
.PMC *add(PMC *value, PMC *dest)
*value
to the integer and returns the result in *dest
.void "append" (PMC *self, PMC *value)
*value
to the end of the array.void mark()
void delete_keyed(PMC *key)
INTVAL elements()
INTVAL get_bool()
PMC *get_class()
INTVAL get_integer()
PMC *get_iter ()
PMC *get_pmc_keyed(PMC *key)
key
.PMC *get_pmc_keyed_int(INTVAL key)
key
.STRING *get_string()
STRING *get_string_keyed(PMC *key)
key
as a string.INTVAL is_equal (PMC *value)
==
operation.
Compares two array to hold equal elements.PMC *multiply_int(INTVAL value, PMC *dest)
void push_integer (INTVAL value)
value
to the end of the array.void push_pmc (PMC *value)
*value
to the end of the array.void push_string (STRING *value)
*value
to the end of the array.void set_integer_keyed_int (INTVAL key, INTVAL value)
key
to value
.void set_integer_native(INTVAL size)
size
.void set_pmc_keyed(PMC *key)
key
to *value
.void set_pmc_keyed_int(INTVAL key, PMC *src)
*src
to the array at index key
.void set_string_keyed_int(INTVAL key, STRING *value)
key
to value
.void* "sort"(PMC *cmp_func)
|