Get a function defined as component of a table.
Functions in tables might be retrieved by position or key. If both optional parameters are provided, the key is attempted to be read first. Only when that fails, the position will be tested.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(flu_State) | :: | L |
Handle for the Lua script. |
|||
integer, | intent(in), | optional | :: | parent |
Handle to the table to look in for the function. |
|
type(aot_fun_type), | intent(out) | :: | fun |
Returned handle, providing access to the function. |
||
character(len=*), | intent(in), | optional | :: | key |
Name of the function to look up in the table. |
|
integer, | intent(in), | optional | :: | pos |
Position of the function to look up in the table. |
subroutine aot_fun_table(L, parent, fun, key, pos) type(flu_state) :: L !! Handle for the Lua script. !> Handle to the table to look in for the function. integer, intent(in), optional :: parent !> Returned handle, providing access to the function. type(aot_fun_type), intent(out) :: fun !> Name of the function to look up in the table. character(len=*), intent(in), optional :: key !> Position of the function to look up in the table. integer, intent(in), optional :: pos call aot_table_push(L, parent, key, pos) fun = aot_fun_top(L) end subroutine aot_fun_table