From bb2e2bec18a322c27066c5898a239129cee46ec9 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 1 Apr 1997 14:31:42 -0300 Subject: new lua function "tag" --- inout.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/inout.c b/inout.c index 485d11b2..a30659ce 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.49 1997/03/31 14:17:09 roberto Exp roberto $"; +char *rcs_inout="$Id: inout.c,v 2.50 1997/03/31 20:59:09 roberto Exp roberto $"; #include #include @@ -213,6 +213,11 @@ static void luaI_basicgetglobal (void) lua_pushobject(lua_basicgetglobal(luaL_check_string(1, "basicgetglobal"))); } +static void luatag (void) +{ + lua_pushnumber(lua_tag(lua_getparam(1))); +} + #define MAXPARAMS 256 static void luaI_call (void) { @@ -315,6 +320,7 @@ static struct { {"settag", luaIl_settag}, {"tonumber", lua_obj2number}, {"tostring", luaI_tostring}, + {"tag", luatag}, {"type", luaI_type} }; -- cgit v1.2.3-55-g6feb