一个简单的生产示例。
protocol.onConnect(function() end, function () end, ...)
现在在c语言中,我想获取参数#1、#2中的函数。
在字符串、数字等中,我们可以使用(lua_getstring,...)来获取它们,但至少我没有找到如何获取函数。
int luaProtocolOnConnect(lua_State* L)
{
int base_func // func #1
int call_func // func #2
....
}
lua_State
引用存储到CFunction
中是否安全吗?是否存在引用移动的风险? - Hibou57