diff options
Diffstat (limited to 'lapi.c')
-rw-r--r-- | lapi.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lapi.c,v 1.50 1999/09/21 16:10:13 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 1.51 1999/10/04 17:51:04 roberto Exp roberto $ |
3 | ** Lua API | 3 | ** Lua API |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -216,6 +216,9 @@ void lua_rawsetglobal (const char *name) { | |||
216 | } | 216 | } |
217 | 217 | ||
218 | 218 | ||
219 | const char *lua_type (lua_Object o) { | ||
220 | return (o == LUA_NOOBJECT) ? "NOOBJECT" : luaO_typename(Address(o)); | ||
221 | } | ||
219 | 222 | ||
220 | int lua_isnil (lua_Object o) { | 223 | int lua_isnil (lua_Object o) { |
221 | return (o!= LUA_NOOBJECT) && (ttype(Address(o)) == LUA_T_NIL); | 224 | return (o!= LUA_NOOBJECT) && (ttype(Address(o)) == LUA_T_NIL); |