diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-07-21 13:02:57 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-07-21 13:02:57 -0300 |
commit | c697aa30bccc80af3b005cfdbe62686edd730a14 (patch) | |
tree | 9036d65aab56aaad9724169f3520cf8c589a50ab /lapi.c | |
parent | 17ee57f8e022be330d4c9de3754d7455f46a851d (diff) | |
download | lua-c697aa30bccc80af3b005cfdbe62686edd730a14.tar.gz lua-c697aa30bccc80af3b005cfdbe62686edd730a14.tar.bz2 lua-c697aa30bccc80af3b005cfdbe62686edd730a14.zip |
more precise type for argument to 'aux_upvalue'
Diffstat (limited to 'lapi.c')
-rw-r--r-- | lapi.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lapi.c,v 2.228 2014/07/18 14:46:47 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 2.229 2014/07/19 15:09:37 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 | */ |
@@ -1154,13 +1154,13 @@ LUA_API void *lua_newuserdata (lua_State *L, size_t size) { | |||
1154 | 1154 | ||
1155 | 1155 | ||
1156 | static const char *aux_upvalue (StkId fi, int n, TValue **val, | 1156 | static const char *aux_upvalue (StkId fi, int n, TValue **val, |
1157 | GCObject **owner, UpVal **uv) { | 1157 | CClosure **owner, UpVal **uv) { |
1158 | switch (ttype(fi)) { | 1158 | switch (ttype(fi)) { |
1159 | case LUA_TCCL: { /* C closure */ | 1159 | case LUA_TCCL: { /* C closure */ |
1160 | CClosure *f = clCvalue(fi); | 1160 | CClosure *f = clCvalue(fi); |
1161 | if (!(1 <= n && n <= f->nupvalues)) return NULL; | 1161 | if (!(1 <= n && n <= f->nupvalues)) return NULL; |
1162 | *val = &f->upvalue[n-1]; | 1162 | *val = &f->upvalue[n-1]; |
1163 | if (owner) *owner = obj2gco(f); | 1163 | if (owner) *owner = f; |
1164 | return ""; | 1164 | return ""; |
1165 | } | 1165 | } |
1166 | case LUA_TLCL: { /* Lua closure */ | 1166 | case LUA_TLCL: { /* Lua closure */ |
@@ -1195,7 +1195,7 @@ LUA_API const char *lua_getupvalue (lua_State *L, int funcindex, int n) { | |||
1195 | LUA_API const char *lua_setupvalue (lua_State *L, int funcindex, int n) { | 1195 | LUA_API const char *lua_setupvalue (lua_State *L, int funcindex, int n) { |
1196 | const char *name; | 1196 | const char *name; |
1197 | TValue *val = NULL; /* to avoid warnings */ | 1197 | TValue *val = NULL; /* to avoid warnings */ |
1198 | GCObject *owner = NULL; | 1198 | CClosure *owner = NULL; |
1199 | UpVal *uv = NULL; | 1199 | UpVal *uv = NULL; |
1200 | StkId fi; | 1200 | StkId fi; |
1201 | lua_lock(L); | 1201 | lua_lock(L); |