diff options
Diffstat (limited to '')
| -rw-r--r-- | lapi.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lapi.c,v 1.154 2001/10/11 21:40:56 roberto Exp $ | 2 | ** $Id: lapi.c,v 1.155 2001/10/17 21:12:57 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 | */ |
| @@ -466,7 +466,7 @@ LUA_API int lua_ref (lua_State *L, int lock) { | |||
| 466 | return LUA_REFNIL; | 466 | return LUA_REFNIL; |
| 467 | } | 467 | } |
| 468 | lua_rawgeti(L, LUA_REGISTRYINDEX, 0); /* get first free element */ | 468 | lua_rawgeti(L, LUA_REGISTRYINDEX, 0); /* get first free element */ |
| 469 | ref = lua_tonumber(L, -1); | 469 | ref = cast(int, lua_tonumber(L, -1)); |
| 470 | lua_pop(L, 1); /* remove it from stack */ | 470 | lua_pop(L, 1); /* remove it from stack */ |
| 471 | if (ref != 0) { /* some free element? */ | 471 | if (ref != 0) { /* some free element? */ |
| 472 | lua_rawgeti(L, LUA_REGISTRYINDEX, ref); /* remove it from list */ | 472 | lua_rawgeti(L, LUA_REGISTRYINDEX, ref); /* remove it from list */ |
