aboutsummaryrefslogtreecommitdiff
path: root/ltests.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2008-02-11 16:04:26 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2008-02-11 16:04:26 -0200
commitdcee7d2fe035067f7042057022089c4b73be3ed7 (patch)
treea775c87e98320dd5c327d741a9b86566320136b5 /ltests.c
parent5f0a2f6248941f758d0b1cee77a8890ff8b05c68 (diff)
downloadlua-dcee7d2fe035067f7042057022089c4b73be3ed7.tar.gz
lua-dcee7d2fe035067f7042057022089c4b73be3ed7.tar.bz2
lua-dcee7d2fe035067f7042057022089c4b73be3ed7.zip
new instructions 'newtable' and 'checkstack' in 'testC'
Diffstat (limited to 'ltests.c')
-rw-r--r--ltests.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/ltests.c b/ltests.c
index 2720516c..e0a7f2ae 100644
--- a/ltests.c
+++ b/ltests.c
@@ -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)
1003static struct X { int x; } x; 1010static struct X { int x; } x;