NAME ^

src/dynpmc/perlarray.pmc - Perl Array

DESCRIPTION ^

These are the vtable functions for the PerlArray PMC.

Functions ^

static PMC *undef(Interp *interp)

Returns the PerlUndef PMC.

static PMC *Parrot_PerlArray_set_pmc_ptr(Interp *interp, List *list, INTVAL key)

Returns the PMC pointer for the element at index key.

Methods ^

void set_integer_keyed_int(INTVAL key, INTVAL value)

Converts value to a PerlInt and assigns it to the array at index key.

void set_integer_keyed(PMC *key, INTVAL value)

Assigns value to the array at index *key.

void set_number_keyed_int(INTVAL key, FLOATVAL value)

Assigns value to the array at index key.

void set_number_keyed(PMC *key, FLOATVAL value)

Assigns value to the array at index *key.

void set_string_keyed_int(INTVAL key, STRING *value)

Assigns *value to the array at index key.

void set_string_keyed (PMC *key, STRING *value)

Assigns *value to the array at index *key.

void set_pmc_keyed_int(INTVAL key, PMC *src)

Assigns *src to the array at index key.

void set_pmc_keyed (PMC *key, PMC *value)

Assigns *value to the array at index *key.

INTVAL get_integer_keyed_int(INTVAL key)

Returns the integer value of the element at index key.

FLOATVAL get_number_keyed_int(INTVAL key)

Returns the floating-point value of the element at index key.

STRING *get_string()

Returns the number of elements in the array as a Parrot string.

STRING *get_string_keyed_int(INTVAL key)

Returns the Parrot string value of the element at index key.

PMC *get_pmc_keyed_int(INTVAL key)

Returns the PMC value of the element at index key.

TODO ^

Fix the arithmetic ops (right now they just corrupt the array length and possibly seg fault).


parrot