NAME ^

src/key.c - Base vtable calling functions

DESCRIPTION ^

The base vtable calling functions.

Functions ^

PMC *key_new

Returns a new Key PMC.

PMC *key_new_integer

Returns a new integer Key PMC with value value.

PMC *key_new_number

Returns a new number Key PMC with value value.

PMC *key_new_string

Returns a new string Key PMC with value value.

PMC *key_new_cstring

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

PMC *key_new_pmc

Returns a new PMC Key PMC with value value.

void key_set_integer

Set the integer value in key.

void key_set_register

Set the register value in key.

void key_set_number

Set the number value in key.

void key_set_string

Set the string value in key.

void key_set_pmc

Set the PMC value in key.

INTVAL key_type

Returns the type of key.

INTVAL key_integer

Translates a key value into an integer. Takes an interpreter name and pointer to a key. Returns an integer value corresponding to the key.

FLOATVAL key_number

Translates a key value into a number. Takes an interpreter name and pointer to a key. Returns a number value corresponding to the key. Throws an exception if the key is not a valid number.

STRING *key_string

Translates a key value into a string. Takes an interpreter name and pointer to a key. Returns a string value corresponding to the key.

PMC *key_pmc

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

PMC *key_next

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

PMC *key_append

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

Marks key as live.

STRING *key_set_to_string

Translates a series of key values into strings, quoted or bracketed if appropriate. Takes an interpreter name and pointer to a key. Returns a string value corresponding to the key.

SEE ALSO ^

include/parrot/key.h.

HISTORY ^

Initial version by Jeff G. on 2001.12.05.


parrot