diff options
| -rw-r--r-- | ldo.c | 4 | ||||
| -rw-r--r-- | lstate.h | 3 | ||||
| -rw-r--r-- | lualib.h | 11 |
3 files changed, 5 insertions, 13 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ldo.c,v 1.229 2003/11/11 16:34:17 roberto Exp roberto $ | 2 | ** $Id: ldo.c,v 2.1 2003/12/10 12:13:36 roberto Exp roberto $ |
| 3 | ** Stack and Call structure of Lua | 3 | ** Stack and Call structure of Lua |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -268,7 +268,7 @@ StkId luaD_precall (lua_State *L, StkId func) { | |||
| 268 | if (L->hookmask & LUA_MASKCALL) | 268 | if (L->hookmask & LUA_MASKCALL) |
| 269 | luaD_callhook(L, LUA_HOOKCALL, -1); | 269 | luaD_callhook(L, LUA_HOOKCALL, -1); |
| 270 | lua_unlock(L); | 270 | lua_unlock(L); |
| 271 | n = (*clvalue(L->base - 1)->c.f)(L); /* do the actual call */ | 271 | n = (*curr_func(L)->c.f)(L); /* do the actual call */ |
| 272 | lua_lock(L); | 272 | lua_lock(L); |
| 273 | return L->top - n; | 273 | return L->top - n; |
| 274 | } | 274 | } |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lstate.h,v 1.119 2003/12/04 18:52:23 roberto Exp roberto $ | 2 | ** $Id: lstate.h,v 2.1 2003/12/10 12:13:36 roberto Exp roberto $ |
| 3 | ** Global State | 3 | ** Global State |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -85,6 +85,7 @@ typedef struct CallInfo { | |||
| 85 | 85 | ||
| 86 | 86 | ||
| 87 | 87 | ||
| 88 | #define curr_func(L) (clvalue(L->base - 1)) | ||
| 88 | #define ci_func(ci) (clvalue((ci)->base - 1)) | 89 | #define ci_func(ci) (clvalue((ci)->base - 1)) |
| 89 | #define f_isLua(ci) (!ci_func(ci)->c.isC) | 90 | #define f_isLua(ci) (!ci_func(ci)->c.isC) |
| 90 | #define isLua(ci) (ttisfunction((ci)->base - 1) && f_isLua(ci)) | 91 | #define isLua(ci) (ttisfunction((ci)->base - 1) && f_isLua(ci)) |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lualib.h,v 1.27 2003/03/17 13:04:58 roberto Exp roberto $ | 2 | ** $Id: lualib.h,v 1.28 2003/03/18 12:24:26 roberto Exp roberto $ |
| 3 | ** Lua standard libraries | 3 | ** Lua standard libraries |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -44,13 +44,4 @@ LUALIB_API int luaopen_loadlib (lua_State *L); | |||
| 44 | #define lua_assert(c) /* empty */ | 44 | #define lua_assert(c) /* empty */ |
| 45 | #endif | 45 | #endif |
| 46 | 46 | ||
| 47 | |||
| 48 | /* compatibility code */ | ||
| 49 | #define lua_baselibopen luaopen_base | ||
| 50 | #define lua_tablibopen luaopen_table | ||
| 51 | #define lua_iolibopen luaopen_io | ||
| 52 | #define lua_strlibopen luaopen_string | ||
| 53 | #define lua_mathlibopen luaopen_math | ||
| 54 | #define lua_dblibopen luaopen_debug | ||
| 55 | |||
| 56 | #endif | 47 | #endif |
