cocos2dx-Lua的LuaCallFunc对象创建lambda传参bug

function test()
local seq= cc.Sequence:create(
cc.ScaleBy:create(0.1,2),
cc.CallFunc:create(function()
print(“callfunc did”)
end)
)
local node = cc.Node:create()
self:addChild(node)
node:runAction(seq:clone())
end
上述函数无论在3.15还是最新的3.17.2版本 CallFunc都不被执行
原因是initWithFunction函数创建lambda表达式时引用了外部的tolua_ret,如下:
tolua_ret->initWithFunction([=](void* self,Node* target){
int callbackHandler = ScriptHandlerMgr::getInstance()->getObjectHandler((void*)tolua_ret, ScriptHandlerMgr::HandlerType::CALLFUNC);

});
将(void*)tolua_ret改成(void*)self就可以正常执行