Pārlūkot izejas kodu

small errors in previous `ci' of luaconf.h.

Roberto Ierusalimschy 20 gadi atpakaļ
vecāks
revīzija
d872090248
4 mainītis faili ar 16 papildinājumiem un 15 dzēšanām
  1. 2 2
      lapi.c
  2. 2 2
      lstate.c
  3. 6 5
      ltests.h
  4. 6 6
      luaconf.h

+ 2 - 2
lapi.c

@@ -1,5 +1,5 @@
 /*
-** $Id: lapi.c,v 2.31 2005/03/09 16:28:07 roberto Exp roberto $
+** $Id: lapi.c,v 2.32 2005/03/16 16:58:41 roberto Exp roberto $
 ** Lua API
 ** See Copyright Notice in lua.h
 */
@@ -141,7 +141,7 @@ LUA_API lua_State *lua_newthread (lua_State *L) {
   setthvalue(L, L->top, L1);
   api_incr_top(L);
   lua_unlock(L);
-  lua_userstateopen(L1);
+  luai_userstateopen(L1);
   return L1;
 }
 

+ 2 - 2
lstate.c

@@ -1,5 +1,5 @@
 /*
-** $Id: lstate.c,v 2.25 2005/02/23 17:30:22 roberto Exp roberto $
+** $Id: lstate.c,v 2.26 2005/03/18 18:02:04 roberto Exp roberto $
 ** Global State
 ** See Copyright Notice in lua.h
 */
@@ -179,7 +179,7 @@ LUA_API lua_State *lua_newstate (lua_Alloc f, void *ud) {
     L = NULL;
   }
   else
-    lua_userstateopen(L);
+    luai_userstateopen(L);
   return L;
 }
 

+ 6 - 5
ltests.h

@@ -1,5 +1,5 @@
 /*
-** $Id: ltests.h,v 2.10 2004/09/10 17:30:46 roberto Exp roberto $
+** $Id: ltests.h,v 2.11 2005/01/10 16:31:30 roberto Exp roberto $
 ** Internal Header for Debugging of the Lua Implementation
 ** See Copyright Notice in lua.h
 */
@@ -51,14 +51,15 @@ int lua_checkmemory (lua_State *L);
 
 
 /* test for lock/unlock */
-#undef lua_userstateopen
+#undef luai_userstateopen
 #undef lua_lock
 #undef lua_unlock
+#undef LUAI_EXTRASPACE
 
 extern int islocked;
-#define LUA_USERSTATE	int *
-#define getlock(l)	(*(cast(LUA_USERSTATE *, l) - 1))
-#define lua_userstateopen(l)	getlock(l) = &islocked;
+#define LUAI_EXTRASPACE		sizeof(double)
+#define getlock(l)	(*(cast(int **, l) - 1))
+#define luai_userstateopen(l)	getlock(l) = &islocked;
 #define lua_lock(l)     lua_assert((*getlock(l))++ == 0)
 #define lua_unlock(l)   lua_assert(--(*getlock(l)) == 0)
 

+ 6 - 6
luaconf.h

@@ -1,5 +1,5 @@
 /*
-** $Id: luaconf.h,v 1.35 2005/03/09 16:28:07 roberto Exp roberto $
+** $Id: luaconf.h,v 1.36 2005/03/18 18:02:04 roberto Exp roberto $
 ** Configuration file for Lua
 ** See Copyright Notice in lua.h
 */
@@ -233,9 +233,9 @@
 *@ LUAI_MAXCALLS limits the number of nested calls.
 ** CHANGE it if you need really deep recursive calls. This limit is
 ** arbitrary; its only purpose is to stop infinite recursion before
-** exhausting memory. (This value must fit in an unsigned short.)
+** exhausting memory.
 */
-#define LUAI_MAXCALLS	40000
+#define LUAI_MAXCALLS	20000
 
 
 /*
@@ -510,7 +510,7 @@ __inline int l_lrint (double flt)
 
 
 /*
-*@ LUA_EXTRASPACE allows you to add user-specific data in a lua_State
+*@ LUAI_EXTRASPACE allows you to add user-specific data in a lua_State
 ** (the data goes just *before* the lua_State pointer).
 ** CHANGE (define) this if you really need that. This value must be
 ** a multiple of the maximum alignment required for your machine.
@@ -519,8 +519,8 @@ __inline int l_lrint (double flt)
 
 
 /*
-*@ lua_userstateopen allows user-specific initialization on new threads.
-** CHANGE it if you defined LUA_EXTRASPACE and need to initialize that
+*@ luai_userstateopen allows user-specific initialization on new threads.
+** CHANGE it if you defined LUAI_EXTRASPACE and need to initialize that
 ** data whenever a new lua_State is created.
 */
 #define luai_userstateopen(L)	((void)0)