aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2008-06-12 11:20:49 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2008-06-12 11:20:49 -0300
commit92a0d4c67fb962679559c6bce67ab57280a99f3e (patch)
tree78f02d66aadc6991ac9688bdf47086e15268a793
parent5fa55df2ca1124f67fddda2b5cb80d2bc9b7ad30 (diff)
downloadlua-92a0d4c67fb962679559c6bce67ab57280a99f3e.tar.gz
lua-92a0d4c67fb962679559c6bce67ab57280a99f3e.tar.bz2
lua-92a0d4c67fb962679559c6bce67ab57280a99f3e.zip
extra options in 'testC' for newmetatable and testudata
-rw-r--r--ltests.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/ltests.c b/ltests.c
index 37d26927..bca00795 100644
--- a/ltests.c
+++ b/ltests.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltests.c,v 2.47 2008/02/19 18:55:09 roberto Exp roberto $ 2** $Id: ltests.c,v 2.48 2008/04/02 17:38:54 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*/
@@ -1010,6 +1010,13 @@ static int testC (lua_State *L) {
1010 if (!lua_checkstack(L1, getnum)) 1010 if (!lua_checkstack(L1, getnum))
1011 luaL_error(L, "C stack overflow"); 1011 luaL_error(L, "C stack overflow");
1012 } 1012 }
1013 else if EQ("newmetatable") {
1014 lua_pushboolean(L1, luaL_newmetatable(L1, getname));
1015 }
1016 else if EQ("testudata") {
1017 int i = getindex;
1018 lua_pushboolean(L1, luaL_testudata(L1, i, getname) != NULL);
1019 }
1013 else if EQ("throw") { 1020 else if EQ("throw") {
1014#if defined(__cplusplus) 1021#if defined(__cplusplus)
1015static struct X { int x; } x; 1022static struct X { int x; } x;