diff options
| -rw-r--r-- | ltests.c | 9 |
1 files changed, 8 insertions, 1 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ltests.c,v 2.43 2007/06/21 13:48:04 roberto Exp roberto $ | 2 | ** $Id: ltests.c,v 2.44 2007/11/12 16:28:45 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 | */ |
| @@ -925,6 +925,9 @@ static int testC (lua_State *L) { | |||
| 925 | else if EQ("pushbool") { | 925 | else if EQ("pushbool") { |
| 926 | lua_pushboolean(L1, getnum); | 926 | lua_pushboolean(L1, getnum); |
| 927 | } | 927 | } |
| 928 | else if EQ("newtable") { | ||
| 929 | lua_newtable(L1); | ||
| 930 | } | ||
| 928 | else if EQ("newuserdata") { | 931 | else if EQ("newuserdata") { |
| 929 | lua_newuserdata(L1, getnum); | 932 | lua_newuserdata(L1, getnum); |
| 930 | } | 933 | } |
| @@ -998,6 +1001,10 @@ static int testC (lua_State *L) { | |||
| 998 | int i = getindex; | 1001 | int i = getindex; |
| 999 | lua_pushinteger(L1, lua_objlen(L1, i)); | 1002 | lua_pushinteger(L1, lua_objlen(L1, i)); |
| 1000 | } | 1003 | } |
| 1004 | else if EQ("checkstack") { | ||
| 1005 | if (!lua_checkstack(L1, getnum)) | ||
| 1006 | luaL_error(L, "C stack overflow"); | ||
| 1007 | } | ||
| 1001 | else if EQ("throw") { | 1008 | else if EQ("throw") { |
| 1002 | #if defined(__cplusplus) | 1009 | #if defined(__cplusplus) |
| 1003 | static struct X { int x; } x; | 1010 | static struct X { int x; } x; |
