diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-12-10 09:30:51 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-12-10 09:30:51 -0200 |
commit | 741ad97e924086e9c2c55d4dcbb2cf1cc429a705 (patch) | |
tree | f7dc71e9a383293b82b68b3c08431e8e5032420d | |
parent | b4633c586b4ca189d3249e8c2b2a695a5280081c (diff) | |
download | lua-741ad97e924086e9c2c55d4dcbb2cf1cc429a705.tar.gz lua-741ad97e924086e9c2c55d4dcbb2cf1cc429a705.tar.bz2 lua-741ad97e924086e9c2c55d4dcbb2cf1cc429a705.zip |
new parameter for testC instruction 'pcall' (error handler)
-rw-r--r-- | ltests.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltests.c,v 2.198 2014/11/25 14:51:33 roberto Exp roberto $ | 2 | ** $Id: ltests.c,v 2.199 2014/11/29 17:38:33 roberto Exp roberto $ |
3 | ** Internal Module for Debugging of the Lua Implementation | 3 | ** Internal Module for Debugging of the Lua Implementation |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -963,10 +963,10 @@ static int checkpanic (lua_State *L) { | |||
963 | 963 | ||
964 | 964 | ||
965 | /* | 965 | /* |
966 | ** {====================================================== | 966 | ** {==================================================================== |
967 | ** function to test the API with C. It interprets a kind of assembler | 967 | ** function to test the API with C. It interprets a kind of assembler |
968 | ** language with calls to the API, so the test can be driven by Lua code | 968 | ** language with calls to the API, so the test can be driven by Lua code |
969 | ** ======================================================= | 969 | ** ===================================================================== |
970 | */ | 970 | */ |
971 | 971 | ||
972 | 972 | ||
@@ -1207,7 +1207,7 @@ static int runC (lua_State *L, lua_State *L1, const char *pc) { | |||
1207 | else if EQ("pcall") { | 1207 | else if EQ("pcall") { |
1208 | int narg = getnum; | 1208 | int narg = getnum; |
1209 | int nres = getnum; | 1209 | int nres = getnum; |
1210 | status = lua_pcall(L1, narg, nres, 0); | 1210 | status = lua_pcall(L1, narg, nres, getnum); |
1211 | } | 1211 | } |
1212 | else if EQ("pcallk") { | 1212 | else if EQ("pcallk") { |
1213 | int narg = getnum; | 1213 | int narg = getnum; |