This module provides general operations on Lua tables.
These operations are a common set of actions, that are used by the various type specific implementations.
This subroutine tries to push the value of the entry given by key or pos within the table thandle onto the Lua stack.
If no corresponding value is found, a nil value is pushed to the stack. Key, pos and thandle are all optional. If no thandle is provided, the key will be obtained as a global variable. When none of thandle, key and pos are provided, the subroutine does nothing and the resulting type returned in toptype is the type of the current top entry in the Lua stack. Passing only pos without thandle is illegal and will result in a NIL value on the top of the stack.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(flu_State) | :: | L |
Handle for the Lua script. |
|||
integer, | intent(in), | optional | :: | thandle |
Handle to the table to look in. |
|
character(len=*), | intent(in), | optional | :: | key |
Name of the entry to push to the stack. |
|
integer, | intent(in), | optional | :: | pos |
Position of the entry to push to the stack. |
|
integer, | intent(out), | optional | :: | toptype |
Return the position at the top of the stack as a table handle.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(flu_State) | :: | L |
Handle for the Lua script. |
A handle for the table on the top of the stack to access it.
Get the Lua object in table thandle under the given key or pos on the top of the stack and return the Lua type of the gotten entry.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(flu_State) | :: | L |
Handle to the Lua script. |
|||
integer, | intent(in), | optional | :: | thandle |
Handle of the table to get the value from |
|
character(len=*), | intent(in), | optional | :: | key |
Key of the value to find the type for. |
|
integer, | intent(in), | optional | :: | pos |
Position of the value to find the type for. |
Type of the Lua object found in L, thandle, key and pos
Load the first key-value pair of table thandle on the stack.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(flu_State) | :: | L |
Handle for the Lua script. |
|||
integer, | intent(in) | :: | thandle |
Handle to the table to get the first entry of. |
The return value signals, if there actually is such a first entry.
Count the entries in a lua table.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(flu_State) | :: | L |
Handle for the Lua script. |
|||
integer, | intent(in) | :: | thandle |
Handle of the table to count the enries in. |
Returns the number of entries in the table.
This subroutine tries to open a table, and returns a handle for it.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(flu_State) | :: | L |
Handle for the Lua script. |
|||
integer, | intent(in), | optional | :: | parent |
Handle of the table containing the requested table. |
|
integer, | intent(out) | :: | thandle |
A handle for the table to access it, 0 if no table available. |
||
character(len=*), | intent(in), | optional | :: | key |
Name of the entry in the parent table to access. |
|
integer, | intent(in), | optional | :: | pos |
Position of the entry in the parent table to access. |
Close a table again.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(flu_State) | :: | L |
Handle for the Lua script. |
|||
integer, | intent(in) | :: | thandle |
Handle of the table to close. |
This subroutine tries to push the value of the entry given by key or pos within the table thandle onto the Lua stack.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(flu_State) | :: | L |
Handle for the Lua script. |
|||
integer, | intent(in), | optional | :: | thandle |
Handle to the table to look in. |
|
character(len=*), | intent(in), | optional | :: | key |
Name of the entry to push to the stack. |
|
integer, | intent(in), | optional | :: | pos |
Position of the entry to push to the stack. |
|
integer, | intent(out), | optional | :: | toptype |