aot_reference_for Function

public function aot_reference_for(L, thandle, key, pos) result(ref)

Get a reference for the entry defined by thandle, key and pos, or the current top entry in the stack.

The reference can be used to refer to a given object in the Lua table by storing a reference to it in the LUA_REGISTRYINDEX table.

The object can then be put onto the stack again by using this reference.

Arguments

TypeIntentOptionalAttributesName
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.

Return Value integer


Calls

proc~~aot_reference_for~~CallsGraph proc~aot_reference_for aot_reference_for flul_ref flul_ref proc~aot_reference_for->flul_ref proc~flu_getglobal flu_getglobal proc~aot_reference_for->proc~flu_getglobal proc~aot_table_push aot_table_push proc~aot_reference_for->proc~aot_table_push interface~lua_getglobal lua_getglobal proc~flu_getglobal->interface~lua_getglobal proc~aot_table_push->proc~flu_getglobal proc~flu_gettable flu_gettable proc~aot_table_push->proc~flu_gettable proc~flu_pushnil flu_pushnil proc~aot_table_push->proc~flu_pushnil proc~flu_getfield flu_getfield proc~aot_table_push->proc~flu_getfield proc~flu_type flu_type proc~aot_table_push->proc~flu_type proc~flu_pop flu_pop proc~aot_table_push->proc~flu_pop interface~flu_pushinteger flu_pushinteger proc~aot_table_push->interface~flu_pushinteger interface~lua_gettable lua_gettable proc~flu_gettable->interface~lua_gettable interface~lua_pushnil lua_pushnil proc~flu_pushnil->interface~lua_pushnil interface~lua_getfield lua_getfield proc~flu_getfield->interface~lua_getfield interface~lua_type lua_type proc~flu_type->interface~lua_type interface~lua_settop lua_settop proc~flu_pop->interface~lua_settop proc~flu_pushint flu_pushint interface~flu_pushinteger->proc~flu_pushint proc~flu_pushlong flu_pushlong interface~flu_pushinteger->proc~flu_pushlong interface~lua_pushinteger lua_pushinteger proc~flu_pushint->interface~lua_pushinteger proc~flu_pushlong->interface~lua_pushinteger

Contents


Variables

TypeVisibilityAttributesNameInitial
integer, private :: toptype