fluL_loadbuffer Function

public function fluL_loadbuffer(L, buffer, bufName) result(errcode)

Arguments

Type IntentOptional Attributes Name
type(flu_State) :: L
character(len=1) :: buffer(:)
character(len=*), optional :: bufName

Return Value integer


Calls

proc~~flul_loadbuffer~~CallsGraph proc~flul_loadbuffer fluL_loadbuffer interface~lual_loadbufferx luaL_loadbufferx proc~flul_loadbuffer->interface~lual_loadbufferx

Called by

proc~~flul_loadbuffer~~CalledByGraph proc~flul_loadbuffer fluL_loadbuffer proc~open_config_buffer open_config_buffer proc~open_config_buffer->proc~flul_loadbuffer proc~aot_require_buffer aot_require_buffer proc~aot_require_buffer->proc~open_config_buffer

Source Code

  function fluL_loadbuffer(L, buffer, bufName) result(errcode)
    type(flu_State) :: L
    character :: buffer(:)
    character(len=*), optional :: bufName
    integer :: errcode

    character(len=33) :: label
    character(len=3) :: c_mode
    integer(kind=c_int) :: c_errcode
    integer(kind=c_size_t) :: nChars

    if (present(bufName)) then
      label = trim(bufName) // c_null_char
    else
      label = 'ScriptBuffer' // c_null_char
    end if
    nChars = int(size(buffer),kind=kind(nChars))
    c_mode = "bt" // c_null_char
    c_errcode = luaL_loadbufferx(L%state, buffer, nChars, label, c_mode)
    errcode = c_errcode
  end function fluL_loadbuffer