NAME ^

src/key.c - Base vtable calling functions

DESCRIPTION ^

The base vtable calling functions.

Functions ^

PMC *key_new(Interp *interp)

Returns a new Key PMC.

PMC *key_new_integer(Interp *interp, INTVAL value)

Returns a new integer Key PMC with value value.

PMC *key_new_number(Interp *interp, FLOATVAL value)

Returns a new number Key PMC with value value.

PMC *key_new_string(Interp *interp, STRING *value)

Returns a new string Key PMC with value value.

PMC *key_new_cstring(Interp *interp, const char *value)

Returns a new string Key PMC with value value converted to a STRING.

PMC *key_new_pmc(Interp *interp, PMC *value)

Returns a new PMC Key PMC with value value.

void key_set_integer(Interp *interp, PMC *key, INTVAL value)

Set the integer value in key.

void key_set_register(Interp *interp, PMC *key, INTVAL value, INTVAL flag)

Set the register value in key.

void key_set_number(Interp *interp, PMC *key, FLOATVAL value)

Set the number value in key.

void key_set_string(Interp *interp, PMC *key, STRING *value)

Set the string value in key.

void key_set_pmc(Interp *interp, PMC *key, PMC *value)

Set the PMC value in key.

INTVAL key_type(Interp *interp, PMC *key)

Returns the type of key.

INTVAL key_integer(Interp *interp, PMC *key)

FLOATVAL key_number(Interp *interp, PMC *key)

STRING *key_string(Interp *interp, PMC *key)

PMC *key_pmc(Interp *interp, PMC *key)

These functions return the integer/number/string/PMC values of key if possible. Otherwise they throws an exceptions.

PMC *key_next(Interp *interp, PMC *key)

Returns the next key if key is in a sequence of linked keys.

PMC *key_append(Interp *interp, PMC *key1, PMC *key2)

Appends key2 to key1.

Note that if key1 is not the last key in a sequence linked keys then the last key will be found and key2 appended to that.

Returns key1.

void key_mark(Interp *interp, PMC *key)

Marks key as live.

SEE ALSO ^

include/parrot/key.h.

HISTORY ^

Initial version by Jeff G. on 2001.12.05.


parrot