src/key.c - Base vtable calling functions


The base vtable calling functions.

Functions ^

PMC *key_new(Interp *interpreter)

Returns a new Key PMC.

PMC *key_new_integer(Interp *interpreter, INTVAL value)

Returns a new integer Key PMC with value value.

PMC *key_new_number(Interp *interpreter, FLOATVAL value)

Returns a new number Key PMC with value value.

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

Returns a new string Key PMC with value value.

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

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

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

Returns a new PMC Key PMC with value value.

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

Set the integer value in key.

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

Set the register value in key.

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

Set the number value in key.

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

Set the string value in key.

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

Set the PMC value in key.

INTVAL key_type(Interp *interpreter, PMC *key)

Returns the type of key.

INTVAL key_integer(Interp *interpreter, PMC *key)

FLOATVAL key_number(Interp *interpreter, PMC *key)

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

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

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

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

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

PMC *key_append(Interp *interpreter, 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 *interpreter, PMC *key)

Marks key as live.




Initial version by Jeff G. on 2001.12.05.