From 4244da96bfcf205624487b99b69e9d8dd1857293 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 22 Jul 2013 13:05:53 -0300 Subject: 'debug.subtype' -> 'math.type' (to distinguish integers and floats) --- ldblib.c | 35 +---------------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) (limited to 'ldblib.c') diff --git a/ldblib.c b/ldblib.c index 9da5e49f..2b48113d 100644 --- a/ldblib.c +++ b/ldblib.c @@ -1,5 +1,5 @@ /* -** $Id: ldblib.c,v 1.133 2013/06/25 19:37:00 roberto Exp roberto $ +** $Id: ldblib.c,v 1.134 2013/07/10 20:57:05 roberto Exp roberto $ ** Interface from Lua to its debug API ** See Copyright Notice in lua.h */ @@ -34,38 +34,6 @@ static int db_numbits (lua_State *L) { } -static int db_subtype (lua_State *L) { - int tp = lua_type(L, 1); - switch (tp) { - case LUA_TNONE: - luaL_checkany(L, 1); - break; - case LUA_TNUMBER: - if (lua_isinteger(L, 1)) - lua_pushliteral(L, "integer"); - else - lua_pushliteral(L, "float"); - break; - case LUA_TFUNCTION: - if (lua_iscfunction(L, 1)) - lua_pushliteral(L, "Cfunction"); - else - lua_pushliteral(L, "Luafunction"); - break; - case LUA_TUSERDATA: - if (lua_islightuserdata(L, 1)) - lua_pushliteral(L, "lightudata"); - else - lua_pushliteral(L, "fulludata"); - break; - default: - lua_pushstring(L, lua_typename(L, tp)); - break; - } - return 1; -} - - static int db_getregistry (lua_State *L) { lua_pushvalue(L, LUA_REGISTRYINDEX); return 1; @@ -431,7 +399,6 @@ static const luaL_Reg dblib[] = { {"setlocal", db_setlocal}, {"setmetatable", db_setmetatable}, {"setupvalue", db_setupvalue}, - {"subtype", db_subtype}, {"traceback", db_traceback}, {NULL, NULL} }; -- cgit v1.2.3-55-g6feb