NAME ^

classes/pytuple.pmc - Python tuple

DESCRIPTION ^

This class, PyTuple, implements an array of fixed size, which stores PMCs, it puts things into Integer, Float, or String PMCs as appropriate

Methods ^

void init()

Initializes the array.

void destroy()

Destroys the array.

PMC* "__new__"(PMC *class, PMC *value)

Create a new long.

INTVAL get_bool()

Returns true iff there are elements in the tuple.

INTVAL elements()

Returns the number of elements in the array.

PMC *get_class()

Return the class of this object.

INTVAL get_integer()

Returns the number of elements in the array.

PMC *get_iter ()

Return a new iterator for SELF.

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()

Return a representation of the tuple

INTVAL is_equal (PMC *value)

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

INTVAL exists_keyed (PMC *value)

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

void set_integer_keyed(PMC *key, INTVAL value)

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

void set_integer_native(INTVAL size)

Resizes the array to size elements.

void set_number_keyed(PMC *key, INTVAL value)

Sets the number value of the element at index key to value.

void set_pmc_keyed_int(INTVAL key, PMC *src)

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

void set_string_keyed_int(INTVAL key, STRING *value)

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


parrot