diff options
Diffstat (limited to 'ltests.c')
-rw-r--r-- | ltests.c | 17 |
1 files changed, 3 insertions, 14 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltests.c,v 2.6 2004/05/10 17:50:51 roberto Exp roberto $ | 2 | ** $Id: ltests.c,v 2.7 2004/05/31 18:50:48 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 | */ |
@@ -760,16 +760,6 @@ static int int2fb_aux (lua_State *L) { | |||
760 | } | 760 | } |
761 | 761 | ||
762 | 762 | ||
763 | static int test_do (lua_State *L) { | ||
764 | const char *p = luaL_checkstring(L, 1); | ||
765 | if (*p == '@') | ||
766 | lua_dofile(L, p+1); | ||
767 | else | ||
768 | lua_dostring(L, p); | ||
769 | return lua_gettop(L); | ||
770 | } | ||
771 | |||
772 | |||
773 | 763 | ||
774 | /* | 764 | /* |
775 | ** {====================================================== | 765 | ** {====================================================== |
@@ -858,8 +848,8 @@ static int testC (lua_State *L) { | |||
858 | const char *s = lua_tostring(L, getnum); | 848 | const char *s = lua_tostring(L, getnum); |
859 | lua_pushstring(L, s); | 849 | lua_pushstring(L, s); |
860 | } | 850 | } |
861 | else if EQ("strlen") { | 851 | else if EQ("objsize") { |
862 | lua_pushinteger(L, lua_strlen(L, getnum)); | 852 | lua_pushinteger(L, lua_objsize(L, getnum)); |
863 | } | 853 | } |
864 | else if EQ("tocfunction") { | 854 | else if EQ("tocfunction") { |
865 | lua_pushcfunction(L, lua_tocfunction(L, getnum)); | 855 | lua_pushcfunction(L, lua_tocfunction(L, getnum)); |
@@ -1033,7 +1023,6 @@ static const struct luaL_reg tests_funcs[] = { | |||
1033 | {"stacklevel", stacklevel}, | 1023 | {"stacklevel", stacklevel}, |
1034 | {"querystr", string_query}, | 1024 | {"querystr", string_query}, |
1035 | {"querytab", table_query}, | 1025 | {"querytab", table_query}, |
1036 | {"doit", test_do}, | ||
1037 | {"testC", testC}, | 1026 | {"testC", testC}, |
1038 | {"checkmemory", lua_checkmemory}, | 1027 | {"checkmemory", lua_checkmemory}, |
1039 | {"gccolor", get_gccolor}, | 1028 | {"gccolor", get_gccolor}, |