Module rglua::lua_shared[][src]

Statics

Same as luaL_checknumber, but casts it to an integer.

Checks whether the value at stack index ‘narg’ is a number and returns this number. If it is not a lua number, will throw an error to Lua.

Creates a copy of string ‘s’ by replacing any occurrence of the string ‘p’ with the string ‘r’ Pushes the resulting string on the stack and returns it

Internally called by luaL_register, opens given list of LuaRegs with number of functions provided explicitly

Opens the standard ‘table’ library for a lua state

When called with libname as nullptr, it simply registers all functions in the list l reg! into the table on the top of the stack.

Sets the error handler for the lua state.

Destroys the given lua state. You probably don’t want to do this, unless you just want to self destruct the server / your client.

Starts and resumes a coroutine in a given thread. Blame garry for the _real

Opens the standard ‘table’ library for a lua state

Opens the standard ‘table’ library for a lua state

Opens the standard ‘table’ library for a lua state

Opens the standard ‘table’ library for a lua state

Opens the standard ‘table’ library for a lua state

Opens the standard ‘os’ library for a lua state

Opens the standard ‘package’ library for a lua state

Opens the standard ‘string’ library for a lua state

Opens the standard ‘table’ library for a lua state

Functions

If a condition is false, throws an argument error at numarg

Loads and pcalls a file’s lua code Returns if the code was successfully executed Error will be left on the stack if the code failed to execute

Loads and pcalls a string of lua code Returns if the code was successfully executed Error will be left on the stack if the code failed to execute

Returns value at crate::globals::Lua::REGISTRYINDEX with name ‘name’

Returns the type name of object at index i

Gets a value from _G Internally calls lua_getfield with crate::globals::Lua::GLOBALSINDEX

Returns if the value at the given index is a boolean.

Returns if the value at the given index is a C or Lua function.

Returns if the value at the given index is nil. You might want to use lua_isnoneornil instead.

Returns if the value at the given index is none (element outside of stack / invalid)

Returns if the value at the given index is none (invalid) or nil.

Returns if the value at the given index is a table.

Returns if the value at the given index is a thread.

Pops n elements from the lua stack.

Pushes a “C” function to the stack

Starts and resumes a coroutine in a given thread

Sets a value in _G Internally calls lua_setfield with crate::globals::Lua::GLOBALSINDEX

Equivalent to lua_tolstring with len equal to 0