From 88d7ffb0d0c7303ef1b766b1100e4220e775ab57 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 20 Mar 1997 16:20:23 -0300 Subject: [PATCH] luaI_type moved to fallback.c --- inout.c | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/inout.c b/inout.c index 13cf73e9..f2aec14c 100644 --- a/inout.c +++ b/inout.c @@ -5,7 +5,7 @@ ** Also provides some predefined lua functions. */ -char *rcs_inout="$Id: inout.c,v 2.46 1997/03/17 17:01:10 roberto Exp roberto $"; +char *rcs_inout="$Id: inout.c,v 2.47 1997/03/19 19:41:10 roberto Exp roberto $"; #include #include @@ -160,34 +160,6 @@ static void luaI_print (void) printf("%s\n", tostring(obj)); } -/* -** Internal function: return an object type. -*/ -static void luaI_type (void) -{ - lua_Object o = lua_getparam(1); - int t = lua_tag(o); - char *s; - if (t == LUA_T_NUMBER) - s = "number"; - else if (lua_isstring(o)) - s = "string"; - else if (lua_istable(o)) - s = "table"; - else if (lua_isnil(o)) - s = "nil"; - else if (lua_isfunction(o)) - s = "function"; - else if (lua_isuserdata(o)) - s = "userdata"; - else { - lua_error("no parameter to function 'type'"); - return; /* to avoid warnings */ - } - lua_pushliteral(s); - lua_pushnumber(t); -} - /* ** Internal function: convert an object to a number */