This module provides access to Lua functions
Intented usage:
Open a Lua function for evaluation.
Get a function defined as component of a table.
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. |
Get a function from a previously defned Lua reference.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(flu_state) | :: | L | Handle for the Lua script. |
|||
type(aot_fun_type), | intent(out) | :: | fun | Returned handle, providing access to the function. |
||
integer, | intent(in) | :: | ref | Lua reference to the function. |
Put an argument into the lua function.
Put the top of the stack as argument into the list of arguments for the function.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(flu_state) | :: | L | Handle for the Lua script. |
|||
type(aot_fun_type) | :: | fun | Handle of the function, this argument should be put into. |
Put an argument of type double into the list of arguments for the function.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(flu_state) | :: | L | Handle for the Lua script. |
|||
type(aot_fun_type) | :: | fun | Handle of the function, this argument should be put into. |
|||
real(kind=double_k), | intent(in) | :: | arg | Actual argument to hand over to the Lua function. |
Put an argument of type single into the list of arguments for the function.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(flu_state) | :: | L | Handle for the Lua script. |
|||
type(aot_fun_type) | :: | fun | Handle of the function, this argument should be put into. |
|||
real(kind=single_k), | intent(in) | :: | arg | Actual argument to hand over to the Lua function. |
Put an array of doubles into the list of arguments for the function.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(flu_state) | :: | L | Handle for the Lua script. |
|||
type(aot_fun_type) | :: | fun | Handle of the function, this argument should be put into. |
|||
real(kind=double_k), | intent(in) | :: | arg(:) | Actual argument to hand over to the Lua function. |
Put an array of singles into the list of arguments for the function.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(flu_state) | :: | L | Handle for the Lua script. |
|||
type(aot_fun_type) | :: | fun | Handle of the function, this argument should be put into. |
|||
real(kind=single_k), | intent(in) | :: | arg(:) | Actual argument to hand over to the Lua function. |
Return the stack of the top as a function.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(flu_state) | :: | L | Handle for the Lua script. |
Handle to the function on the top of the stack.
A string identifying the function uniquely in the Lua script.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(aot_fun_type), | intent(in) | :: | fun | Function to identify. |
Identification of the function as a string.
Close the function again (pop everything above from the stack).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(flu_state) | :: | L | Handle for the Lua script. |
|||
type(aot_fun_type) | :: | fun | Handle to the function to close. |
Execute a given function and put its results on the stack, where it is retrievable with aot_top_get_val.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(flu_state) | :: | L | Handle for the Lua script. |
|||
type(aot_fun_type) | :: | fun | Handle to the function to execute. |
|||
integer, | intent(in) | :: | nresults | Number of resulting values the caller wants to obtain from the Lua function. |
||
integer, | intent(out), | optional | :: | ErrCode | Error code returned by Lua during execution of the function. |
|
character(len=*), | intent(out), | optional | :: | ErrString | Obtained error string from the Lua stack if an error occured. |
Get a function defined as component of a table.
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. |
Get a function from a previously defned Lua reference.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(flu_state) | :: | L | Handle for the Lua script. |
|||
type(aot_fun_type), | intent(out) | :: | fun | Returned handle, providing access to the function. |
||
integer, | intent(in) | :: | ref | Lua reference to the function. |
Put the top of the stack as argument into the list of arguments for the function.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(flu_state) | :: | L | Handle for the Lua script. |
|||
type(aot_fun_type) | :: | fun | Handle of the function, this argument should be put into. |
Put an argument of type double into the list of arguments for the function.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(flu_state) | :: | L | Handle for the Lua script. |
|||
type(aot_fun_type) | :: | fun | Handle of the function, this argument should be put into. |
|||
real(kind=double_k), | intent(in) | :: | arg | Actual argument to hand over to the Lua function. |
Put an argument of type single into the list of arguments for the function.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(flu_state) | :: | L | Handle for the Lua script. |
|||
type(aot_fun_type) | :: | fun | Handle of the function, this argument should be put into. |
|||
real(kind=single_k), | intent(in) | :: | arg | Actual argument to hand over to the Lua function. |
Put an array of doubles into the list of arguments for the function.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(flu_state) | :: | L | Handle for the Lua script. |
|||
type(aot_fun_type) | :: | fun | Handle of the function, this argument should be put into. |
|||
real(kind=double_k), | intent(in) | :: | arg(:) | Actual argument to hand over to the Lua function. |
Put an array of singles into the list of arguments for the function.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(flu_state) | :: | L | Handle for the Lua script. |
|||
type(aot_fun_type) | :: | fun | Handle of the function, this argument should be put into. |
|||
real(kind=single_k), | intent(in) | :: | arg(:) | Actual argument to hand over to the Lua function. |