NAME ^

src/key.c - Base vtable calling functions

DESCRIPTION ^

The base vtable calling functions.

Functions ^

PARROT_API PARROT_CANNOT_RETURN_NULL PARROT_WARN_UNUSED_RESULT PMC *key_new(PARROT_INTERP)

Returns a new Key PMC.

PARROT_API PARROT_CANNOT_RETURN_NULL PARROT_WARN_UNUSED_RESULT PMC *key_new_integer(PARROT_INTERP, INTVAL value)

Returns a new integer Key PMC with value value.

PARROT_API PARROT_CANNOT_RETURN_NULL PARROT_WARN_UNUSED_RESULT PMC *key_new_number(PARROT_INTERP, FLOATVAL value)

Returns a new number Key PMC with value value.

PARROT_API PARROT_CANNOT_RETURN_NULL PARROT_WARN_UNUSED_RESULT PMC *key_new_string(PARROT_INTERP, NOTNULL(STRING *value))

Returns a new string Key PMC with value value.

PARROT_API PARROT_CANNOT_RETURN_NULL PARROT_WARN_UNUSED_RESULT PMC *key_new_cstring(PARROT_INTERP, NULLOK(const char *value))

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

PARROT_API PARROT_CANNOT_RETURN_NULL PARROT_WARN_UNUSED_RESULT PMC *key_new_pmc(PARROT_INTERP, NOTNULL(PMC *value))

Returns a new PMC Key PMC with value value.

PARROT_API void key_set_integer(SHIM_INTERP, NOTNULL(PMC *key), INTVAL value)

Set the integer value in key.

PARROT_API void key_set_register(SHIM_INTERP, NOTNULL(PMC *key), INTVAL value, INTVAL flag)

Set the register value in key.

PARROT_API void key_set_number(SHIM_INTERP, NOTNULL(PMC *key), FLOATVAL value)

Set the number value in key.

PARROT_API void key_set_string(SHIM_INTERP, NOTNULL(PMC *key), NOTNULL(STRING *value))

Set the string value in key.

PARROT_API void key_set_pmc(PARROT_INTERP, NOTNULL(PMC *key), NOTNULL(PMC *value))

Set the PMC value in key.

PARROT_API PARROT_WARN_UNUSED_RESULT INTVAL key_type(SHIM_INTERP, NOTNULL(const PMC *key))

Returns the type of key.

PARROT_API PARROT_WARN_UNUSED_RESULT INTVAL key_integer(PARROT_INTERP, NOTNULL(PMC *key))

TODO: Not yet documented!!!

PARROT_API PARROT_WARN_UNUSED_RESULT FLOATVAL key_number(PARROT_INTERP, NOTNULL(PMC *key))

TODO: Not yet documented!!!

PARROT_API PARROT_WARN_UNUSED_RESULT PARROT_CANNOT_RETURN_NULL STRING *key_string(PARROT_INTERP, NOTNULL(PMC *key))

TODO: Not yet documented!!!

PARROT_API PARROT_CANNOT_RETURN_NULL PARROT_WARN_UNUSED_RESULT PMC *key_pmc(PARROT_INTERP, NOTNULL(PMC *key))

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

PARROT_API PARROT_CAN_RETURN_NULL PARROT_WARN_UNUSED_RESULT PMC *key_next(SHIM_INTERP, NOTNULL(PMC *key))

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

PARROT_API PARROT_CANNOT_RETURN_NULL PARROT_IGNORABLE_RESULT PMC *key_append(SHIM_INTERP, NOTNULL(PMC *key1), NOTNULL(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.

PARROT_API void key_mark(PARROT_INTERP, NOTNULL(PMC *key))

Marks key as live.

PARROT_API PARROT_CANNOT_RETURN_NULL PARROT_WARN_UNUSED_RESULT STRING *key_set_to_string(PARROT_INTERP, NULLOK(PMC *key))

TODO: Not yet documented!!!

SEE ALSO ^

include/parrot/key.h.

HISTORY ^

Initial version by Jeff G. on 2001.12.05.


parrot