diff options
| author | Philipp Janda <siffiejoe@gmx.net> | 2015-04-26 19:14:17 +0200 |
|---|---|---|
| committer | Philipp Janda <siffiejoe@gmx.net> | 2015-04-26 19:14:17 +0200 |
| commit | 0a59104baac417a8559947ee007b35a086c3ec73 (patch) | |
| tree | 5bdc43ce605b431a9479badd3ca177b1defec8b4 /compat53/init.lua | |
| parent | 7a15ca6f5f158a97f17602d1cf48aa697b32edb9 (diff) | |
| download | lua-compat-5.3-0a59104baac417a8559947ee007b35a086c3ec73.tar.gz lua-compat-5.3-0a59104baac417a8559947ee007b35a086c3ec73.tar.bz2 lua-compat-5.3-0a59104baac417a8559947ee007b35a086c3ec73.zip | |
Choose correct xpcall implementation in compat53 module.
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('#', ...) |
