diff options
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 1.149 2001/07/22 00:59:36 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 1.152 2001/09/07 17:39:10 roberto Exp $ |
| 3 | ** Lua API | 3 | ** Lua API |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -248,7 +248,7 @@ LUA_API size_t lua_strlen (lua_State *L, int index) { | |||
| 248 | 248 | ||
| 249 | LUA_API lua_CFunction lua_tocfunction (lua_State *L, int index) { | 249 | LUA_API lua_CFunction lua_tocfunction (lua_State *L, int index) { |
| 250 | StkId o = luaA_indexAcceptable(L, index); | 250 | StkId o = luaA_indexAcceptable(L, index); |
| 251 | return (o == NULL || !iscfunction(o)) ? NULL : clvalue(o)->u.c.f; | 251 | return (o == NULL || !iscfunction(o)) ? NULL : clvalue(o)->c.f; |
| 252 | } | 252 | } |
| 253 | 253 | ||
| 254 | 254 | ||
| @@ -314,10 +314,10 @@ LUA_API void lua_pushcclosure (lua_State *L, lua_CFunction fn, int n) { | |||
| 314 | lua_lock(L); | 314 | lua_lock(L); |
| 315 | api_checknelems(L, n); | 315 | api_checknelems(L, n); |
| 316 | cl = luaF_newCclosure(L, n); | 316 | cl = luaF_newCclosure(L, n); |
| 317 | cl->u.c.f = fn; | 317 | cl->c.f = fn; |
| 318 | L->top -= n; | 318 | L->top -= n; |
| 319 | while (n--) | 319 | while (n--) |
| 320 | setobj(&cl->u.c.upvalue[n], L->top+n); | 320 | setobj(&cl->c.upvalue[n], L->top+n); |
| 321 | setclvalue(L->top, cl); | 321 | setclvalue(L->top, cl); |
| 322 | incr_top; | 322 | incr_top; |
| 323 | lua_unlock(L); | 323 | lua_unlock(L); |
