NAME ^

classes/resizablepmcarray.pmc - resizable array for PMCs only

DESCRIPTION ^

This class, ResizablePMCArray, implements an resizable array, which stores PMCs. It puts things into Integer, Float, or String PMCs as appropriate.

Functions ^

void set_integer_native(INTVAL size)

Resizes the array to size elements.

PMC *shift_pmc()

Removes and returns a PMC from the start of the array.

PMC *get_pmc_keyed_int(INTVAL key)

Returns the PMC value of the element at index key.

void set_pmc_keyed_int(INTVAL key, PMC *src)

Sets the PMC value of the element at index key to *src.

void set_pmc_keyed(PMC *key, PMC *src)

If key is a slice, do a splice as set that item.

void push_pmc (PMC *value)

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

void push_integer(INTVAL value)

void push_string(INTVAL value)

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

void unshift_pmc (PMC *value)

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

PMC *clone()

Creates and returns a copy of the array.

INTVAL is_equal (PMC *value)

The == operation. Compares two array to hold equal elements.

SEE ALSO ^

docs/pdds/pdd17_basic_types.pod.

HISTORY ^

Initial version - Matt Fowles 2004-06-11 Changed allocator to double size - Matt Fowles 2004-06-15


parrot