瀏覽代碼

bug: pseudo-indices should be linked to maximum C stack size

Roberto Ierusalimschy 17 年之前
父節點
當前提交
dd92af69db
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      lua.h

+ 4 - 4
lua.h

@@ -1,5 +1,5 @@
 /*
-** $Id: lua.h,v 1.225 2007/04/17 13:19:53 roberto Exp roberto $
+** $Id: lua.h,v 1.226 2007/08/07 16:53:40 roberto Exp roberto $
 ** Lua - An Extensible Extension Language
 ** Lua.org, PUC-Rio, Brazil (http://www.lua.org)
 ** See Copyright Notice at the end of this file
@@ -33,9 +33,9 @@
 /*
 ** pseudo-indices
 */
-#define LUA_REGISTRYINDEX	(-10000)
-#define LUA_ENVIRONINDEX	(-10001)
-#define LUA_GLOBALSINDEX	(-10002)
+#define LUA_REGISTRYINDEX	(-(LUAI_MCS_AUX) - 1)
+#define LUA_ENVIRONINDEX	(LUA_REGISTRYINDEX - 1)
+#define LUA_GLOBALSINDEX	(LUA_ENVIRONINDEX - 1)
 #define lua_upvalueindex(i)	(LUA_GLOBALSINDEX-(i))