LuaFunc

A strong reference to a LUA function.

Notes: This struct contains a ref-counted store used to keep track of both the LuaState as well as the table reference.

As with all strong references, the original value does not need to exist on the LUA stack, and this struct may be used to continously refer to the value.

Members

Functions

lua
LuaState* lua()
pop
void pop()

Pops the stack, ensuring that the top value is a function.

push
int push()

Pushes the function onto the stack.

Mixins

__anonymous
mixin LuaFuncFuncs
Undocumented in source.

Static functions

makeNew
LuaFunc makeNew(LuaState* lua, lua_CFunction func)

Creates a new LuaFunc using the provided func as the referenced value.

makeRef
LuaFunc makeRef(LuaState* lua)

Creates a new LuaFunc using the function on the top of the LUA stack as the referenced value. This function pops the original value off the stack.

Mixed In Members

From mixin LuaFuncFuncs

bind
auto bind()

Binds this lua function into a statically typed wrapper.

Meta