This module provides procedures to deal with Lua references.
See for example Programming in Lua 27.3.2.
Get a reference for the entry defined by thandle, key and pos, or the current top entry in the stack.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(flu_State) | :: | L | Handle to the Lua script |
|||
integer, | intent(in), | optional | :: | thandle | Handle to the table containing the object to get a reference for. |
|
character(len=*), | intent(in), | optional | :: | key | Name of the object to look up, if thandle is not present, this is a global definition. If neither thandle nor key is provided, a reference to the top of the stack is returned. |
|
integer, | intent(in), | optional | :: | pos | Positional index of the object inside thandle to get the reference for. If thandle is not provided, this argument is ignored. If a key is provided, that takes precedent over pos. |
Put a given reference (ref) in the Lua script (L) to the top of the stack.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(flu_State) | :: | L | Handle to the Lua script |
|||
integer | :: | ref | Reference retrieved by aot_reference_for to put on the top of the stack |