diff options
Diffstat (limited to 'lapi.c')
-rw-r--r-- | lapi.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lapi.c,v 1.26 1998/07/12 16:16:02 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 1.27 1998/08/21 17:43:44 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 | */ |
@@ -452,6 +452,12 @@ lua_Function lua_stackedfunction (int level) | |||
452 | } | 452 | } |
453 | 453 | ||
454 | 454 | ||
455 | int lua_nups (lua_Function func) { | ||
456 | TObject *o = luaA_Address(func); | ||
457 | return (!o || normalized_type(o) != LUA_T_CLOSURE) ? 0 : o->value.cl->nelems; | ||
458 | } | ||
459 | |||
460 | |||
455 | int lua_currentline (lua_Function func) | 461 | int lua_currentline (lua_Function func) |
456 | { | 462 | { |
457 | TObject *f = Address(func); | 463 | TObject *f = Address(func); |