NAME ^

classes/luatable.pmc - Lua Table

DESCRIPTION ^

LuaTable extends Hash to provide a class with the behaviour of the Lua Table type.

TRIVIAL IMPLEMENTATION : Table is just a Parrot Hash, like in Lua 4.0. Now, Lua 5.0 uses a hybrid data structure with a Hash part and an Array part.

Overloaded Methods ^

STRING *name()

Return the string "table".

STRING *get_string()

INTVAL get_bool()

In Lua, both nil and false make a condition false; any other values makes it true.

So return always true.

PMC *get_pmc_keyed (PMC *key)

table accessor.

void set_pmc_keyed (PMC *key, PMC *value)

table mutator.

PMC logical_not(PMC *dest)

Return always false.

AUTHORS ^

Original code by Klaas-Jan Stol.


parrot