flu_copyptr Function

public function flu_copyptr(lua_state) result(L)

Copy an existing Lua state.

Warning

This copies the pointer to an existing Lua state, not the Lua state itself. Modifying L via the flu bindings will modify the same Lua state as pointed to by lua_state.

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(in) :: lua_state

Return Value type(flu_State)


Source Code

  function flu_copyptr(lua_state) result(L)
      type(flu_State) :: L
      type(c_ptr), intent(in) :: lua_state
      L%state = lua_state
  end function flu_copyptr