diff options
Diffstat (limited to '')
| -rw-r--r-- | lapi.c | 19 |
1 files changed, 1 insertions, 18 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lapi.c,v 1.237 2003/05/05 18:39:57 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 1.238 2003/05/09 20:16:54 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 | */ |
| @@ -843,23 +843,6 @@ LUA_API void *lua_newuserdata (lua_State *L, size_t size) { | |||
| 843 | } | 843 | } |
| 844 | 844 | ||
| 845 | 845 | ||
| 846 | LUA_API int lua_pushupvalues (lua_State *L) { | ||
| 847 | Closure *func; | ||
| 848 | int n, i; | ||
| 849 | lua_lock(L); | ||
| 850 | api_check(L, iscfunction(L->base - 1)); | ||
| 851 | func = clvalue(L->base - 1); | ||
| 852 | n = func->c.nupvalues; | ||
| 853 | luaD_checkstack(L, n + LUA_MINSTACK); | ||
| 854 | for (i=0; i<n; i++) { | ||
| 855 | setobj2s(L->top, &func->c.upvalue[i]); | ||
| 856 | L->top++; | ||
| 857 | } | ||
| 858 | lua_unlock(L); | ||
| 859 | return n; | ||
| 860 | } | ||
| 861 | |||
| 862 | |||
| 863 | static const char *aux_upvalue (lua_State *L, int funcindex, int n, | 846 | static const char *aux_upvalue (lua_State *L, int funcindex, int n, |
| 864 | TObject **val) { | 847 | TObject **val) { |
| 865 | Closure *f; | 848 | Closure *f; |
