diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-03-18 15:55:45 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-03-18 15:55:45 -0300 |
commit | d872090248f7c90ce8d19af4eda3c0a6727f1261 (patch) | |
tree | 056a5aae39cd0dde1afbb063a786090b5def488f | |
parent | fb0f95a2b77f5be3b7be72c33dda9ad6d8894d4d (diff) | |
download | lua-d872090248f7c90ce8d19af4eda3c0a6727f1261.tar.gz lua-d872090248f7c90ce8d19af4eda3c0a6727f1261.tar.bz2 lua-d872090248f7c90ce8d19af4eda3c0a6727f1261.zip |
small errors in previous `ci' of luaconf.h.
-rw-r--r-- | lapi.c | 4 | ||||
-rw-r--r-- | lstate.c | 4 | ||||
-rw-r--r-- | ltests.h | 11 | ||||
-rw-r--r-- | luaconf.h | 12 |
4 files changed, 16 insertions, 15 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lapi.c,v 2.31 2005/03/09 16:28:07 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 2.32 2005/03/16 16:58:41 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 | */ |
@@ -141,7 +141,7 @@ LUA_API lua_State *lua_newthread (lua_State *L) { | |||
141 | setthvalue(L, L->top, L1); | 141 | setthvalue(L, L->top, L1); |
142 | api_incr_top(L); | 142 | api_incr_top(L); |
143 | lua_unlock(L); | 143 | lua_unlock(L); |
144 | lua_userstateopen(L1); | 144 | luai_userstateopen(L1); |
145 | return L1; | 145 | return L1; |
146 | } | 146 | } |
147 | 147 | ||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lstate.c,v 2.25 2005/02/23 17:30:22 roberto Exp roberto $ | 2 | ** $Id: lstate.c,v 2.26 2005/03/18 18:02:04 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 | */ |
@@ -179,7 +179,7 @@ LUA_API lua_State *lua_newstate (lua_Alloc f, void *ud) { | |||
179 | L = NULL; | 179 | L = NULL; |
180 | } | 180 | } |
181 | else | 181 | else |
182 | lua_userstateopen(L); | 182 | luai_userstateopen(L); |
183 | return L; | 183 | return L; |
184 | } | 184 | } |
185 | 185 | ||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltests.h,v 2.10 2004/09/10 17:30:46 roberto Exp roberto $ | 2 | ** $Id: ltests.h,v 2.11 2005/01/10 16:31:30 roberto Exp roberto $ |
3 | ** Internal Header for Debugging of the Lua Implementation | 3 | ** Internal Header for Debugging of the Lua Implementation |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -51,14 +51,15 @@ int lua_checkmemory (lua_State *L); | |||
51 | 51 | ||
52 | 52 | ||
53 | /* test for lock/unlock */ | 53 | /* test for lock/unlock */ |
54 | #undef lua_userstateopen | 54 | #undef luai_userstateopen |
55 | #undef lua_lock | 55 | #undef lua_lock |
56 | #undef lua_unlock | 56 | #undef lua_unlock |
57 | #undef LUAI_EXTRASPACE | ||
57 | 58 | ||
58 | extern int islocked; | 59 | extern int islocked; |
59 | #define LUA_USERSTATE int * | 60 | #define LUAI_EXTRASPACE sizeof(double) |
60 | #define getlock(l) (*(cast(LUA_USERSTATE *, l) - 1)) | 61 | #define getlock(l) (*(cast(int **, l) - 1)) |
61 | #define lua_userstateopen(l) getlock(l) = &islocked; | 62 | #define luai_userstateopen(l) getlock(l) = &islocked; |
62 | #define lua_lock(l) lua_assert((*getlock(l))++ == 0) | 63 | #define lua_lock(l) lua_assert((*getlock(l))++ == 0) |
63 | #define lua_unlock(l) lua_assert(--(*getlock(l)) == 0) | 64 | #define lua_unlock(l) lua_assert(--(*getlock(l)) == 0) |
64 | 65 | ||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: luaconf.h,v 1.35 2005/03/09 16:28:07 roberto Exp roberto $ | 2 | ** $Id: luaconf.h,v 1.36 2005/03/18 18:02:04 roberto Exp roberto $ |
3 | ** Configuration file for Lua | 3 | ** Configuration file for Lua |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -233,9 +233,9 @@ | |||
233 | *@ LUAI_MAXCALLS limits the number of nested calls. | 233 | *@ LUAI_MAXCALLS limits the number of nested calls. |
234 | ** CHANGE it if you need really deep recursive calls. This limit is | 234 | ** CHANGE it if you need really deep recursive calls. This limit is |
235 | ** arbitrary; its only purpose is to stop infinite recursion before | 235 | ** arbitrary; its only purpose is to stop infinite recursion before |
236 | ** exhausting memory. (This value must fit in an unsigned short.) | 236 | ** exhausting memory. |
237 | */ | 237 | */ |
238 | #define LUAI_MAXCALLS 40000 | 238 | #define LUAI_MAXCALLS 20000 |
239 | 239 | ||
240 | 240 | ||
241 | /* | 241 | /* |
@@ -510,7 +510,7 @@ __inline int l_lrint (double flt) | |||
510 | 510 | ||
511 | 511 | ||
512 | /* | 512 | /* |
513 | *@ LUA_EXTRASPACE allows you to add user-specific data in a lua_State | 513 | *@ LUAI_EXTRASPACE allows you to add user-specific data in a lua_State |
514 | ** (the data goes just *before* the lua_State pointer). | 514 | ** (the data goes just *before* the lua_State pointer). |
515 | ** CHANGE (define) this if you really need that. This value must be | 515 | ** CHANGE (define) this if you really need that. This value must be |
516 | ** a multiple of the maximum alignment required for your machine. | 516 | ** a multiple of the maximum alignment required for your machine. |
@@ -519,8 +519,8 @@ __inline int l_lrint (double flt) | |||
519 | 519 | ||
520 | 520 | ||
521 | /* | 521 | /* |
522 | *@ lua_userstateopen allows user-specific initialization on new threads. | 522 | *@ luai_userstateopen allows user-specific initialization on new threads. |
523 | ** CHANGE it if you defined LUA_EXTRASPACE and need to initialize that | 523 | ** CHANGE it if you defined LUAI_EXTRASPACE and need to initialize that |
524 | ** data whenever a new lua_State is created. | 524 | ** data whenever a new lua_State is created. |
525 | */ | 525 | */ |
526 | #define luai_userstateopen(L) ((void)0) | 526 | #define luai_userstateopen(L) ((void)0) |