Tao.Lua SDK Documentation

Lua.luaL_register Method 

Opens a library.

[Visual Basic]
Public Shared Sub luaL_register( _
   ByVal L As IntPtr, _
   ByVal libname As String, _
   ByRef l As luaL_Reg _
)
[C#]
public static void luaL_register(
   IntPtr L,
   string libname,
   ref luaL_Reg l
);

Parameters

L
libname
l

Remarks

When called with libname equal to NULL, it simply registers all functions in the list l (see luaL_Reg) into the table on the top of the stack. When called with a non-null libname, creates a new table t, sets it as the value of the global variable libname, sets it as the value of package.loaded[libname], and registers on it all functions in the list l. If there is a table in package.loaded[libname] or in variable libname, reuses this table instead of creating a new one. In any case the function leaves the table on the top of the stack.

See Also

Lua Class | Tao.Lua Namespace