fix: 修复升级lua5.5后的兼容性错误 (#2123)

This commit is contained in:
bitcat🐱
2025-12-24 19:50:38 +08:00
committed by GitHub
parent 9f7634d477
commit a4c6e04ab0
6 changed files with 33 additions and 31 deletions

View File

@@ -992,19 +992,19 @@ function skynet.newservice(name, ...)
return skynet.call(".launcher", "lua" , "LAUNCH", "snlua", name, ...)
end
function skynet.uniqueservice(global, ...)
if global == true then
function skynet.uniqueservice(name, ...)
if name == true then
return assert(skynet.call(".service", "lua", "GLAUNCH", ...))
else
return assert(skynet.call(".service", "lua", "LAUNCH", global, ...))
return assert(skynet.call(".service", "lua", "LAUNCH", name, ...))
end
end
function skynet.queryservice(global, ...)
if global == true then
function skynet.queryservice(name, ...)
if name == true then
return assert(skynet.call(".service", "lua", "GQUERY", ...))
else
return assert(skynet.call(".service", "lua", "QUERY", global, ...))
return assert(skynet.call(".service", "lua", "QUERY", name, ...))
end
end