aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2003-05-14 18:06:56 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2003-05-14 18:06:56 -0300
commitdae99205cfd6f642ffc107bdb949f6a8937992bc (patch)
tree7c48db8ee591bb6a6cf830211231c2903f719188
parent9eb0f25a296c355dc199647a3084de73da726ab2 (diff)
downloadlua-dae99205cfd6f642ffc107bdb949f6a8937992bc.tar.gz
lua-dae99205cfd6f642ffc107bdb949f6a8937992bc.tar.bz2
lua-dae99205cfd6f642ffc107bdb949f6a8937992bc.zip
no more compatibility code
-rw-r--r--lapi.c19
-rw-r--r--lua.h4
2 files changed, 2 insertions, 21 deletions
diff --git a/lapi.c b/lapi.c
index b4ccd8dc..f5deadc8 100644
--- a/lapi.c
+++ b/lapi.c
@@ -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
846LUA_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
863static const char *aux_upvalue (lua_State *L, int funcindex, int n, 846static const char *aux_upvalue (lua_State *L, int funcindex, int n,
864 TObject **val) { 847 TObject **val) {
865 Closure *f; 848 Closure *f;
diff --git a/lua.h b/lua.h
index 20feef70..ac4e7f1f 100644
--- a/lua.h
+++ b/lua.h
@@ -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
262LUA_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))