Call a Lua function and handle its return values.
Get a function argument from the stack.
Get a value of any type from the stack.
Pop return values from stack. Defaults to popValue, but has special handling for $(DPREF2 conversions, functions, LuaVariableReturn), $(STDREF typecons, Tuple), static arrays and void.
Pop a number of elements from the stack.
Pops a $(STDREF typecons, Tuple) from the values at the top of the stack.
Same as calling getValue!(T, typeMismatchHandler)(L, -1), then popping one value from the stack.
Print the Lua stack to stdout.
Push return values to the stack. Defaults to pushValue, but has special handling for $(DPREF2 conversions, functions, LuaVariableReturn), $(STDREF typecons, Tuple) and static arrays.
Pushes all the values in a $(STDREF typecons, Tuple) to the stack.
Push a value of any type to the stack.
Get the associated Lua type for T.
This internal module, with the help of the luad.conversions package, takes care of converting between D and Lua types.
The conversion rules are as follows, where conversion goes both ways:
The conversions are checked in the specified order. For example, even though bool is implicitly convertible to lua_Integer, it will be converted to a boolean because boolean has precedence.
wchar and dchar are explicitly disallowed. Lua strings consist of 8-bit characters, if you want to push UTF-16 or UTF-32 strings, convert to UTF-8 first.
Additionally, the following types are pushable to Lua, but can't be retrieved back: