diff options
Diffstat (limited to 'compat53/init.lua')
| -rw-r--r-- | compat53/init.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compat53/init.lua b/compat53/init.lua index e738091..31085be 100644 --- a/compat53/init.lua +++ b/compat53/init.lua | |||
| @@ -271,7 +271,7 @@ if lua_version == "5.1" then | |||
| 271 | return coroutine_create52(func) | 271 | return coroutine_create52(func) |
| 272 | end | 272 | end |
| 273 | 273 | ||
| 274 | function _G.pcall(func, ...) | 274 | function M.pcall(func, ...) |
| 275 | local current = coroutine_running() | 275 | local current = coroutine_running() |
| 276 | if not current then return pcall(func, ...) end | 276 | if not current then return pcall(func, ...) end |
| 277 | return pcall_exec(current, pcall_coroutine(func), ...) | 277 | return pcall_exec(current, pcall_coroutine(func), ...) |
| @@ -290,7 +290,7 @@ if lua_version == "5.1" then | |||
| 290 | return true, ... | 290 | return true, ... |
| 291 | end | 291 | end |
| 292 | 292 | ||
| 293 | function _G.xpcall(f, msgh, ...) | 293 | function M.xpcall(f, msgh, ...) |
| 294 | local current = coroutine_running() | 294 | local current = coroutine_running() |
| 295 | if not current then | 295 | if not current then |
| 296 | local args, n = { ... }, select('#', ...) | 296 | local args, n = { ... }, select('#', ...) |
