Get a function from a previously defned Lua reference.
Use a previously (with aot_reference_for) defined reference to get a function.
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. |
subroutine aot_fun_ref(L, fun, ref)
type(flu_state) :: L !! Handle for the Lua script.
!> Returned handle, providing access to the function.
type(aot_fun_type), intent(out) :: fun
!> Lua reference to the function.
integer, intent(in) :: ref
call aot_reference_to_top(L, ref)
fun = aot_fun_top(L)
end subroutine aot_fun_ref