diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2003-05-14 18:06:56 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2003-05-14 18:06:56 -0300 |
commit | dae99205cfd6f642ffc107bdb949f6a8937992bc (patch) | |
tree | 7c48db8ee591bb6a6cf830211231c2903f719188 | |
parent | 9eb0f25a296c355dc199647a3084de73da726ab2 (diff) | |
download | lua-dae99205cfd6f642ffc107bdb949f6a8937992bc.tar.gz lua-dae99205cfd6f642ffc107bdb949f6a8937992bc.tar.bz2 lua-dae99205cfd6f642ffc107bdb949f6a8937992bc.zip |
no more compatibility code
-rw-r--r-- | lapi.c | 19 | ||||
-rw-r--r-- | lua.h | 4 |
2 files changed, 2 insertions, 21 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; |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lua.h,v 1.174 2003/02/27 11:52:30 roberto Exp roberto $ | 2 | ** $Id: lua.h,v 1.175 2003/03/18 12:31:39 roberto Exp roberto $ |
3 | ** Lua - An Extensible Extension Language | 3 | ** Lua - An Extensible Extension Language |
4 | ** Tecgraf: Computer Graphics Technology Group, PUC-Rio, Brazil | 4 | ** Tecgraf: Computer Graphics Technology Group, PUC-Rio, Brazil |
5 | ** http://www.lua.org mailto:info@lua.org | 5 | ** http://www.lua.org mailto:info@lua.org |
@@ -259,8 +259,6 @@ LUA_API void lua_concat (lua_State *L, int n); | |||
259 | */ | 259 | */ |
260 | 260 | ||
261 | 261 | ||
262 | LUA_API int lua_pushupvalues (lua_State *L); | ||
263 | |||
264 | #define lua_getregistry(L) lua_pushvalue(L, LUA_REGISTRYINDEX) | 262 | #define lua_getregistry(L) lua_pushvalue(L, LUA_REGISTRYINDEX) |
265 | #define lua_setglobal(L,s) \ | 263 | #define lua_setglobal(L,s) \ |
266 | (lua_pushstring(L, s), lua_insert(L, -2), lua_settable(L, LUA_GLOBALSINDEX)) | 264 | (lua_pushstring(L, s), lua_insert(L, -2), lua_settable(L, LUA_GLOBALSINDEX)) |