luaaa
luaaa copied to clipboard
How to handle multiple return values, as Lua supports multiple return values
I have a C++DLL file that I want to register the get type function to the Lua virtual machine. However, the get method needs to return the function execution value and also the obtained value. So, how do I handle these multiple return values? Can I use this template to register to the Lua virtual machine
use std::tuple to return multiple values from c++ to lua, it will be extracted to a table in lua.
there is an example testTuple()/testTuple2() in example.cpp.