NAME ^

classes/tcllist.pmc - Tcl List

DESCRIPTION ^

These are the vtable functions for the TclList base class

Methods ^

void class_init()

Class initialization. Caches the type id of various PMCs because they will be used frequently here.

void init()

Initializes the PMC by calling the underlying list_new() function.

INTVAL elements()

Returns the number of elements in the array.

INTVAL get_integer()

Returns the number of elements in the array.

PMC *get_pmc_keyed(PMC *key)

Returns the PMC value of the element at index key.

PMC *get_pmc_keyed_int(INTVAL key)

Returns the PMC value of the element at index key.

STRING *get_string()

Returns the list as a string

void push_integer (INTVAL value)

Extends the array by adding an element of value value to the end of the array.

void push_pmc (PMC *value)

Extends the array by adding an element of value *value to the end of the array.

void push_string (STRING *value)

Extends the array by adding an element of value *value to the end of the array.

void set_integer_keyed_int (INTVAL key, INTVAL value)

Sets the integer value of the PMC at element key to value.

void set_integer_native(INTVAL size)

Sets the length of the array to size.

void set_pmc_keyed(PMC *key)

Sets the PMC at element key to *value.

void set_pmc_keyed_int(INTVAL key, PMC *src)

Assigns *src to the array at index key.

void set_string_keyed_int(INTVAL key, STRING *value)

Sets the string value of the PMC at element key to value.


parrot