Let's consider the following C function :
void returnMultipleValuesByPointer(int* ret0, int* ret1, int* ret2)
{
*ret0 = 0;
*ret1 = 1;
*ret2 = 2;
}
How to I expose it in Lua using LuaBridge ? All the documentation and examples illustrate complex cases where the pointed objects are classes but I can't find how to deal with such a simple case...
The trivial approach (ie luabridge::getGlobalNamespace(L).addFunction("test", &returnMultipleValuesByPointer))
compiles but does not understand the values are to be passed by address.