diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1997-04-01 14:31:42 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1997-04-01 14:31:42 -0300 |
| commit | bb2e2bec18a322c27066c5898a239129cee46ec9 (patch) | |
| tree | 940aff3435e6200832491bc77fb3e98c9858f1bf | |
| parent | efaaf99c425db615e63b6c5ee56c2878a592e2fa (diff) | |
| download | lua-bb2e2bec18a322c27066c5898a239129cee46ec9.tar.gz lua-bb2e2bec18a322c27066c5898a239129cee46ec9.tar.bz2 lua-bb2e2bec18a322c27066c5898a239129cee46ec9.zip | |
new lua function "tag"
Diffstat (limited to '')
| -rw-r--r-- | inout.c | 8 |
1 files changed, 7 insertions, 1 deletions
| @@ -5,7 +5,7 @@ | |||
| 5 | ** Also provides some predefined lua functions. | 5 | ** Also provides some predefined lua functions. |
| 6 | */ | 6 | */ |
| 7 | 7 | ||
| 8 | char *rcs_inout="$Id: inout.c,v 2.49 1997/03/31 14:17:09 roberto Exp roberto $"; | 8 | char *rcs_inout="$Id: inout.c,v 2.50 1997/03/31 20:59:09 roberto Exp roberto $"; |
| 9 | 9 | ||
| 10 | #include <stdio.h> | 10 | #include <stdio.h> |
| 11 | #include <string.h> | 11 | #include <string.h> |
| @@ -213,6 +213,11 @@ static void luaI_basicgetglobal (void) | |||
| 213 | lua_pushobject(lua_basicgetglobal(luaL_check_string(1, "basicgetglobal"))); | 213 | lua_pushobject(lua_basicgetglobal(luaL_check_string(1, "basicgetglobal"))); |
| 214 | } | 214 | } |
| 215 | 215 | ||
| 216 | static void luatag (void) | ||
| 217 | { | ||
| 218 | lua_pushnumber(lua_tag(lua_getparam(1))); | ||
| 219 | } | ||
| 220 | |||
| 216 | #define MAXPARAMS 256 | 221 | #define MAXPARAMS 256 |
| 217 | static void luaI_call (void) | 222 | static void luaI_call (void) |
| 218 | { | 223 | { |
| @@ -315,6 +320,7 @@ static struct { | |||
| 315 | {"settag", luaIl_settag}, | 320 | {"settag", luaIl_settag}, |
| 316 | {"tonumber", lua_obj2number}, | 321 | {"tonumber", lua_obj2number}, |
| 317 | {"tostring", luaI_tostring}, | 322 | {"tostring", luaI_tostring}, |
| 323 | {"tag", luatag}, | ||
| 318 | {"type", luaI_type} | 324 | {"type", luaI_type} |
| 319 | }; | 325 | }; |
| 320 | 326 | ||
