aot_require_buffer Subroutine

public subroutine aot_require_buffer(L, buffer, modname)

Load and execute a given buffer and register it in the package table as the given module name.

Arguments

Type IntentOptional Attributes Name
type(flu_State) :: L

Lua State to set load the buffer into.

character(len=1), intent(in) :: buffer(:)

Buffer to load.

character(len=*), intent(in) :: modname

Module name to set.


Calls

proc~~aot_require_buffer~~CallsGraph proc~aot_require_buffer aot_require_buffer interface~aot_table_set_val~3 aot_table_set_val proc~aot_require_buffer->interface~aot_table_set_val~3 proc~aot_table_close aot_table_close proc~aot_require_buffer->proc~aot_table_close proc~aot_table_open aot_table_open proc~aot_require_buffer->proc~aot_table_open proc~open_config_buffer open_config_buffer proc~aot_require_buffer->proc~open_config_buffer proc~set_table_extdouble set_table_extdouble interface~aot_table_set_val~3->proc~set_table_extdouble proc~flu_settop flu_settop proc~aot_table_close->proc~flu_settop proc~aot_table_push aot_table_push proc~aot_table_open->proc~aot_table_push proc~aot_table_top aot_table_top proc~aot_table_open->proc~aot_table_top proc~flu_createtable flu_createtable proc~aot_table_open->proc~flu_createtable proc~flu_getglobal flu_getglobal proc~aot_table_open->proc~flu_getglobal proc~flu_gettop flu_gettop proc~aot_table_open->proc~flu_gettop proc~aot_err_handler aot_err_handler proc~open_config_buffer->proc~aot_err_handler proc~flu_isopen flu_isopen proc~open_config_buffer->proc~flu_isopen proc~flu_pcall flu_pcall proc~open_config_buffer->proc~flu_pcall proc~flul_loadbuffer fluL_loadbuffer proc~open_config_buffer->proc~flul_loadbuffer proc~flul_newstate fluL_newstate proc~open_config_buffer->proc~flul_newstate proc~flul_openlibs fluL_openlibs proc~open_config_buffer->proc~flul_openlibs proc~flu_tolstring flu_tolstring proc~aot_err_handler->proc~flu_tolstring proc~aot_table_push->proc~flu_getglobal interface~flu_pushinteger flu_pushinteger proc~aot_table_push->interface~flu_pushinteger proc~flu_getfield flu_getfield proc~aot_table_push->proc~flu_getfield proc~flu_gettable flu_gettable proc~aot_table_push->proc~flu_gettable proc~flu_pop flu_pop proc~aot_table_push->proc~flu_pop proc~flu_pushnil flu_pushnil proc~aot_table_push->proc~flu_pushnil proc~flu_type flu_type proc~aot_table_push->proc~flu_type proc~aot_table_top->proc~flu_gettop proc~flu_istable flu_isTable proc~aot_table_top->proc~flu_istable proc~aot_table_top->proc~flu_pop interface~lua_createtable lua_createtable proc~flu_createtable->interface~lua_createtable interface~lua_getglobal lua_getglobal proc~flu_getglobal->interface~lua_getglobal interface~lua_gettop lua_gettop proc~flu_gettop->interface~lua_gettop interface~lua_pcallk lua_pcallk proc~flu_pcall->interface~lua_pcallk interface~lua_settop lua_settop proc~flu_settop->interface~lua_settop interface~lual_loadbufferx luaL_loadbufferx proc~flul_loadbuffer->interface~lual_loadbufferx interface~lual_newstate luaL_newstate proc~flul_newstate->interface~lual_newstate interface~lual_openlibs luaL_openlibs proc~flul_openlibs->interface~lual_openlibs proc~set_table_extdouble->interface~flu_pushinteger interface~flu_pushnumber flu_pushnumber proc~set_table_extdouble->interface~flu_pushnumber proc~flu_setfield flu_setfield proc~set_table_extdouble->proc~flu_setfield proc~flu_settable flu_settable proc~set_table_extdouble->proc~flu_settable proc~flu_pushint flu_pushint interface~flu_pushinteger->proc~flu_pushint proc~flu_pushlong flu_pushlong interface~flu_pushinteger->proc~flu_pushlong proc~flu_pushdouble flu_pushdouble interface~flu_pushnumber->proc~flu_pushdouble proc~flu_pushreal flu_pushreal interface~flu_pushnumber->proc~flu_pushreal interface~lua_getfield lua_getfield proc~flu_getfield->interface~lua_getfield interface~lua_gettable lua_gettable proc~flu_gettable->interface~lua_gettable interface~lua_type lua_type proc~flu_istable->interface~lua_type proc~flu_pop->interface~lua_settop interface~lua_pushnil lua_pushnil proc~flu_pushnil->interface~lua_pushnil interface~lua_setfield lua_setfield proc~flu_setfield->interface~lua_setfield interface~lua_settable lua_settable proc~flu_settable->interface~lua_settable interface~lua_tolstring lua_tolstring proc~flu_tolstring->interface~lua_tolstring proc~flu_type->interface~lua_type interface~lua_pushnumber lua_pushnumber proc~flu_pushdouble->interface~lua_pushnumber interface~lua_pushinteger lua_pushinteger proc~flu_pushint->interface~lua_pushinteger proc~flu_pushlong->interface~lua_pushinteger proc~flu_pushreal->interface~lua_pushnumber

Source Code

  subroutine aot_require_buffer(L, buffer, modname)
    type(flu_State) :: L !! Lua State to set load the buffer into.
    character, intent(in) :: buffer(:) !! Buffer to load.
    character(len=*), intent(in) :: modname !! Module name to set.

    integer :: pac_handle
    integer :: ld_handle

    call open_config_buffer(L = L, buffer = buffer, bufName = trim(modname))
    call aot_table_open(L, thandle = pac_handle, key = "package")
    call aot_table_open(L, parent = pac_handle, &
      &                 thandle = ld_handle, key = "loaded")
    call aot_table_set_val(val = .true., L = L, thandle = ld_handle, &
      &                    key = trim(modname))
    call aot_table_close(L, ld_handle)
    call aot_table_close(L, pac_handle)
  end subroutine aot_require_buffer