registerDDelegate

Registers a D delegate to be called from Lua. Code is modified from MrcSnm's example found in the HipremeEngine.

extern (C) public nothrow
int
registerDDelegate
(
alias Func
)
(
lua_State* state
)
if (
isSomeFunction!(Func)
)

Parameters

state lua_State*

The Lua state to handle the data from the Lua side of things. Template params:

Func

The function to be registered. Note: When calling a D delegate from Lua, the first parameter is always a light user data containing the class instance that the delegate should be executed on.

Meta