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.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) |
| 1015 | static struct X { int x; } x; | 1022 | static struct X { int x; } x; |
