This module provides the Fortran Lua interface.
It defines a flu_state which encapsulates the
Lua state and is used to reference a Lua script.
The main content are then the wrapper implementations
which ease the usage of the Lua functions declared
in the lua_fif module.
Naming follows the Lua API, but replaces the lua_
prefix
by flu_
.
Note
Documentation of the actual C functions can be found by replacing
the flu_
prefix here by lua_
and refering to the
Lua API documentation .
module~~flu_binding~~UsesGraph
module~flu_binding
flu_binding
iso_c_binding
iso_c_binding
module~flu_binding->iso_c_binding
module~dump_lua_fif_module
dump_lua_fif_module
module~flu_binding->module~dump_lua_fif_module
module~flu_kinds_module
flu_kinds_module
module~flu_binding->module~flu_kinds_module
module~lua_fif
lua_fif
module~flu_binding->module~lua_fif
module~lua_parameters
lua_parameters
module~flu_binding->module~lua_parameters
module~dump_lua_fif_module->iso_c_binding
module~lua_fif->iso_c_binding
module~lua_fif->module~lua_parameters
module~lua_parameters->iso_c_binding
Nodes of different colours represent the following:
Graph Key
Module
Module
Submodule
Submodule
Subroutine
Subroutine
Function
Function
Program
Program
This Page's Entity
This Page's Entity
Solid arrows point from a submodule to the (sub)module which it is
descended from. Dashed arrows point from a module or program unit to
modules which it uses.
module~~flu_binding~~UsedByGraph
module~flu_binding
flu_binding
module~aot_err_module
aot_err_module
module~aot_err_module->module~flu_binding
module~aot_extdouble_fun_module
aot_extdouble_fun_module
module~aot_extdouble_fun_module->module~flu_binding
module~aot_extdouble_top_module
aot_extdouble_top_module
module~aot_extdouble_fun_module->module~aot_extdouble_top_module
module~aot_table_module
aot_table_module
module~aot_extdouble_fun_module->module~aot_table_module
module~aot_extdouble_table_module
aot_extdouble_table_module
module~aot_extdouble_table_module->module~flu_binding
module~aot_extdouble_table_module->module~aot_err_module
module~aot_extdouble_table_module->module~aot_extdouble_top_module
module~aot_table_ops_module
aot_table_ops_module
module~aot_extdouble_table_module->module~aot_table_ops_module
module~aot_top_module
aot_top_module
module~aot_extdouble_table_module->module~aot_top_module
module~aot_extdouble_top_module->module~flu_binding
module~aot_extdouble_top_module->module~aot_err_module
module~aot_extdouble_vector_module
aot_extdouble_vector_module
module~aot_extdouble_vector_module->module~flu_binding
module~aot_extdouble_vector_module->module~aot_extdouble_top_module
module~aot_extdouble_vector_module->module~aot_table_ops_module
module~aot_extdouble_vector_module->module~aot_top_module
module~aot_fun_module
aot_fun_module
module~aot_fun_module->module~flu_binding
module~aot_fun_module->module~aot_extdouble_fun_module
module~aot_quadruple_fun_module
aot_quadruple_fun_module
module~aot_fun_module->module~aot_quadruple_fun_module
module~aot_references_module
aot_references_module
module~aot_fun_module->module~aot_references_module
module~aot_fun_module->module~aot_table_module
module~aot_fun_module->module~aot_top_module
module~aot_path_module
aot_path_module
module~aot_path_module->module~flu_binding
module~aot_path_module->module~aot_fun_module
module~aot_path_module->module~aot_table_module
module~aotus_module
aotus_module
module~aot_path_module->module~aotus_module
module~aot_quadruple_fun_module->module~flu_binding
module~aot_quadruple_top_module
aot_quadruple_top_module
module~aot_quadruple_fun_module->module~aot_quadruple_top_module
module~aot_quadruple_fun_module->module~aot_table_module
module~aot_quadruple_table_module
aot_quadruple_table_module
module~aot_quadruple_table_module->module~flu_binding
module~aot_quadruple_table_module->module~aot_err_module
module~aot_quadruple_table_module->module~aot_quadruple_top_module
module~aot_quadruple_table_module->module~aot_table_ops_module
module~aot_quadruple_table_module->module~aot_top_module
module~aot_quadruple_top_module->module~flu_binding
module~aot_quadruple_top_module->module~aot_err_module
module~aot_quadruple_vector_module
aot_quadruple_vector_module
module~aot_quadruple_vector_module->module~flu_binding
module~aot_quadruple_vector_module->module~aot_quadruple_top_module
module~aot_quadruple_vector_module->module~aot_table_ops_module
module~aot_quadruple_vector_module->module~aot_top_module
module~aot_references_module->module~flu_binding
module~aot_references_module->module~aot_table_ops_module
module~aot_table_module->module~flu_binding
module~aot_table_module->module~aot_err_module
module~aot_table_module->module~aot_extdouble_table_module
module~aot_table_module->module~aot_quadruple_table_module
module~aot_table_module->module~aot_table_ops_module
module~aot_table_module->module~aot_top_module
module~aot_table_ops_module->module~flu_binding
module~aot_table_ops_module->module~aot_top_module
module~aot_top_module->module~flu_binding
module~aot_top_module->module~aot_err_module
module~aot_top_module->module~aot_extdouble_top_module
module~aot_top_module->module~aot_quadruple_top_module
module~aot_vector_module
aot_vector_module
module~aot_vector_module->module~flu_binding
module~aot_vector_module->module~aot_extdouble_vector_module
module~aot_vector_module->module~aot_quadruple_vector_module
module~aot_vector_module->module~aot_table_ops_module
module~aot_vector_module->module~aot_top_module
module~aotus_module->module~flu_binding
module~aotus_module->module~aot_table_module
module~aotus_module->module~aot_top_module
module~aotus_module->module~aot_vector_module
program~test
test
program~test->module~flu_binding
module~aot_extdouble_out_module
aot_extdouble_out_module
module~aot_extdouble_out_module->module~aot_extdouble_top_module
module~aot_quadruple_out_module
aot_quadruple_out_module
module~aot_quadruple_out_module->module~aot_quadruple_top_module
module~aot_out_module
aot_out_module
module~aot_out_module->module~aot_extdouble_out_module
module~aot_out_module->module~aot_quadruple_out_module
Nodes of different colours represent the following:
Graph Key
Module
Module
Submodule
Submodule
Subroutine
Subroutine
Function
Function
Program
Program
This Page's Entity
This Page's Entity
Solid arrows point from a submodule to the (sub)module which it is
descended from. Dashed arrows point from a module or program unit to
modules which it uses.
Variables
Type
Visibility Attributes
Name
Initial
integer,
public,
parameter
::
FLU_TNONE
=
int(LUA_TNONE)
integer,
public,
parameter
::
FLU_TNIL
=
int(LUA_TNIL)
integer,
public,
parameter
::
FLU_TBOOLEAN
=
int(LUA_TBOOLEAN)
integer,
public,
parameter
::
FLU_TLIGHTUSERDATA
=
int(LUA_TLIGHTUSERDATA)
integer,
public,
parameter
::
FLU_TNUMBER
=
int(LUA_TNUMBER)
integer,
public,
parameter
::
FLU_TSTRING
=
int(LUA_TSTRING)
integer,
public,
parameter
::
FLU_TTABLE
=
int(LUA_TTABLE)
integer,
public,
parameter
::
FLU_TFUNCTION
=
int(LUA_TFUNCTION)
integer,
public,
parameter
::
FLU_TUSERDATA
=
int(LUA_TUSERDATA)
integer,
public,
parameter
::
FLU_TTHREAD
=
int(LUA_TTHREAD)
Interfaces
private subroutine flu_pushreal (L, n)
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
real
::
n
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
real(kind=c_double)
::
n
private subroutine flu_pushint (L, n)
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
integer(kind=int_k)
::
n
private subroutine flu_pushlong (L, n)
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
integer(kind=long_k)
::
n
private subroutine c_free(ptr) bind(c, name="free")
Arguments
Type
Intent Optional Attributes
Name
type(c_ptr),
value
::
ptr
Abstract Interfaces
Interoperable interface required for a function that is callable from Lua.
public function lua_Function(s) result(val) bind(c)
Arguments
Type
Intent Optional Attributes
Name
type(c_ptr),
value
::
s
Return Value
integer(kind=c_int)
Derived Types
Encapsulation of the Lua state.
Read more…
Components
Type
Visibility Attributes
Name
Initial
type(c_ptr),
private
::
state
=
c_null_ptr
logical,
private
::
opened_libs
=
.false.
Components
Type
Visibility Attributes
Name
Initial
type(c_ptr),
public
::
ptr
=
c_null_ptr
character(len=1),
public,
pointer
::
buffer (:)
=>
NULL()
Functions
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
integer
::
index
character(len=*)
::
k
Return Value
integer
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
character(len=*)
::
k
Return Value
integer
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
integer
::
index
Return Value
integer
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
Return Value
integer
Only defined as a Macro, using lua_type:
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
integer
::
index
Return Value
logical
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
integer
::
index
Return Value
logical
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
integer
::
index
Return Value
logical
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
integer
::
index
Return Value
logical
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
integer
::
index
Return Value
logical
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
integer
::
index
Return Value
logical
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
integer
::
index
Return Value
logical
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
integer
::
index
Return Value
logical
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
integer
::
index
Return Value
logical
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
integer,
intent(in)
::
index
Return Value
logical
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
integer
::
nargs
integer
::
nresults
integer
::
errfunc
Return Value
integer
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
integer,
intent(in)
::
index
integer,
intent(in)
::
n
Return Value
integer
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
integer
::
index
integer
::
len
Return Value
character(len=1), pointer, dimension(:)
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
integer
::
index
Return Value
real(kind=c_double)
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
integer
::
index
Return Value
real
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
integer
::
index
Return Value
logical
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
integer
::
index
Return Value
type(c_ptr)
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
integer
::
index
Return Value
integer(kind=long_k)
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
integer
::
index
Return Value
integer
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
integer
::
index
Return Value
integer
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
character(len=*)
::
filename
Return Value
integer
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
character(len=1)
::
buffer (:)
character(len=*),
optional
::
bufName
Return Value
integer
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
character(len=*)
::
string
Return Value
integer
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
character(len=*)
::
tname
Return Value
integer
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
integer
::
t
Return Value
integer
Copy an existing Lua state.
Read more…
Arguments
Type
Intent Optional Attributes
Name
type(c_ptr),
intent(in)
::
lua_state
Return Value
type(flu_State )
Arguments
Type
Intent Optional Attributes
Name
type(flu_State ),
intent(in)
::
L
Return Value
logical
Subroutines
Close a previously opened Lua script.
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
Handle to the Lua state to close.
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
integer
::
narr
integer
::
nrec
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
integer
::
index
Wrapper for lua_pop that pops n elements from the Lua API stack.
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
Handle to the Lua script
integer,
intent(in),
optional
::
n
Number of elements to pop from the Lua API stack, defaults to 1.
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
logical
::
b
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
character(len=*),
intent(in)
::
string
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
integer
::
index
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
type(c_ptr)
::
ptr
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
integer,
intent(in)
::
n
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
integer,
intent(in)
::
n
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
integer
::
index
character(len=*)
::
k
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
character(len=*),
intent(in)
::
k
Arguments
Type
Intent Optional Attributes
Name
type(flu_State ),
value
::
L
procedure(lua_Function )
::
fn
integer
::
n
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
character(len=*),
intent(in)
::
fn_name
procedure(lua_Function )
::
fn
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
character(len=*)
::
tname
Free an allocated cbuf.
Read more…
Arguments
Type
Intent Optional Attributes
Name
type(cbuf_type )
::
buf
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
integer(kind=int_k)
::
n
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
integer(kind=long_k)
::
n
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
real
::
n
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
real(kind=c_double)
::
n
Dump to a buffer and return the pointer to the resulting string.
Arguments
Type
Intent Optional Attributes
Name
type(flu_State )
::
L
type(cbuf_type ),
intent(out)
::
buf
integer
::
length
integer
::
iError