diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-02-23 14:30:22 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-02-23 14:30:22 -0300 |
commit | d55bb795faaa3a632aeb92fd29fc12b796ae7968 (patch) | |
tree | e81b84b41de1264dd078cec37541716ba0ffcf27 /lapi.c | |
parent | d84cc9d2dbf1f44e7126fe3ed9a82eed9757a63a (diff) | |
download | lua-d55bb795faaa3a632aeb92fd29fc12b796ae7968.tar.gz lua-d55bb795faaa3a632aeb92fd29fc12b796ae7968.tar.bz2 lua-d55bb795faaa3a632aeb92fd29fc12b796ae7968.zip |
details
Diffstat (limited to 'lapi.c')
-rw-r--r-- | lapi.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lapi.c,v 2.26 2005/01/14 14:19:42 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 2.27 2005/02/18 12:40:02 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 | */ |
@@ -975,7 +975,7 @@ LUA_API void lua_concat (lua_State *L, int n) { | |||
975 | 975 | ||
976 | LUA_API lua_Alloc lua_getallocf (lua_State *L, void **ud) { | 976 | LUA_API lua_Alloc lua_getallocf (lua_State *L, void **ud) { |
977 | *ud = G(L)->ud; | 977 | *ud = G(L)->ud; |
978 | return G(L)->realloc; | 978 | return G(L)->frealloc; |
979 | } | 979 | } |
980 | 980 | ||
981 | 981 | ||
@@ -993,7 +993,7 @@ LUA_API void *lua_newuserdata (lua_State *L, size_t size) { | |||
993 | 993 | ||
994 | 994 | ||
995 | 995 | ||
996 | static const char *aux_upvalue (lua_State *L, StkId fi, int n, TValue **val) { | 996 | static const char *aux_upvalue (StkId fi, int n, TValue **val) { |
997 | Closure *f; | 997 | Closure *f; |
998 | if (!ttisfunction(fi)) return NULL; | 998 | if (!ttisfunction(fi)) return NULL; |
999 | f = clvalue(fi); | 999 | f = clvalue(fi); |
@@ -1015,7 +1015,7 @@ LUA_API const char *lua_getupvalue (lua_State *L, int funcindex, int n) { | |||
1015 | const char *name; | 1015 | const char *name; |
1016 | TValue *val; | 1016 | TValue *val; |
1017 | lua_lock(L); | 1017 | lua_lock(L); |
1018 | name = aux_upvalue(L, index2adr(L, funcindex), n, &val); | 1018 | name = aux_upvalue(index2adr(L, funcindex), n, &val); |
1019 | if (name) { | 1019 | if (name) { |
1020 | setobj2s(L, L->top, val); | 1020 | setobj2s(L, L->top, val); |
1021 | api_incr_top(L); | 1021 | api_incr_top(L); |
@@ -1032,7 +1032,7 @@ LUA_API const char *lua_setupvalue (lua_State *L, int funcindex, int n) { | |||
1032 | lua_lock(L); | 1032 | lua_lock(L); |
1033 | fi = index2adr(L, funcindex); | 1033 | fi = index2adr(L, funcindex); |
1034 | api_checknelems(L, 1); | 1034 | api_checknelems(L, 1); |
1035 | name = aux_upvalue(L, fi, n, &val); | 1035 | name = aux_upvalue(fi, n, &val); |
1036 | if (name) { | 1036 | if (name) { |
1037 | L->top--; | 1037 | L->top--; |
1038 | setobj(L, val, L->top); | 1038 | setobj(L, val, L->top); |