Roberto Ierusalimschy 21 年之前
父节点
当前提交
26a9b249db
共有 3 个文件被更改,包括 5 次插入13 次删除
  1. 2 2
      ldo.c
  2. 2 1
      lstate.h
  3. 1 10
      lualib.h

+ 2 - 2
ldo.c

@@ -1,5 +1,5 @@
 /*
 /*
-** $Id: ldo.c,v 1.229 2003/11/11 16:34:17 roberto Exp roberto $
+** $Id: ldo.c,v 2.1 2003/12/10 12:13:36 roberto Exp roberto $
 ** Stack and Call structure of Lua
 ** Stack and Call structure of Lua
 ** See Copyright Notice in lua.h
 ** See Copyright Notice in lua.h
 */
 */
@@ -268,7 +268,7 @@ StkId luaD_precall (lua_State *L, StkId func) {
     if (L->hookmask & LUA_MASKCALL)
     if (L->hookmask & LUA_MASKCALL)
       luaD_callhook(L, LUA_HOOKCALL, -1);
       luaD_callhook(L, LUA_HOOKCALL, -1);
     lua_unlock(L);
     lua_unlock(L);
-    n = (*clvalue(L->base - 1)->c.f)(L);  /* do the actual call */
+    n = (*curr_func(L)->c.f)(L);  /* do the actual call */
     lua_lock(L);
     lua_lock(L);
     return L->top - n;
     return L->top - n;
   }
   }

+ 2 - 1
lstate.h

@@ -1,5 +1,5 @@
 /*
 /*
-** $Id: lstate.h,v 1.119 2003/12/04 18:52:23 roberto Exp roberto $
+** $Id: lstate.h,v 2.1 2003/12/10 12:13:36 roberto Exp roberto $
 ** Global State
 ** Global State
 ** See Copyright Notice in lua.h
 ** See Copyright Notice in lua.h
 */
 */
@@ -85,6 +85,7 @@ typedef struct CallInfo {
 
 
 
 
 
 
+#define curr_func(L)	(clvalue(L->base - 1))
 #define ci_func(ci)	(clvalue((ci)->base - 1))
 #define ci_func(ci)	(clvalue((ci)->base - 1))
 #define f_isLua(ci)	(!ci_func(ci)->c.isC)
 #define f_isLua(ci)	(!ci_func(ci)->c.isC)
 #define isLua(ci)	(ttisfunction((ci)->base - 1) && f_isLua(ci))
 #define isLua(ci)	(ttisfunction((ci)->base - 1) && f_isLua(ci))

+ 1 - 10
lualib.h

@@ -1,5 +1,5 @@
 /*
 /*
-** $Id: lualib.h,v 1.27 2003/03/17 13:04:58 roberto Exp roberto $
+** $Id: lualib.h,v 1.28 2003/03/18 12:24:26 roberto Exp roberto $
 ** Lua standard libraries
 ** Lua standard libraries
 ** See Copyright Notice in lua.h
 ** See Copyright Notice in lua.h
 */
 */
@@ -44,13 +44,4 @@ LUALIB_API int luaopen_loadlib (lua_State *L);
 #define lua_assert(c)		/* empty */
 #define lua_assert(c)		/* empty */
 #endif
 #endif
 
 
-
-/* compatibility code */
-#define lua_baselibopen	luaopen_base
-#define lua_tablibopen	luaopen_table
-#define lua_iolibopen	luaopen_io
-#define lua_strlibopen	luaopen_string
-#define lua_mathlibopen	luaopen_math
-#define lua_dblibopen	luaopen_debug
-
 #endif
 #endif