diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2008-01-17 14:24:38 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2008-01-17 14:24:38 -0200 |
| commit | 87b0191753a9e379f75864b3295125348ab4263d (patch) | |
| tree | f6b5def678c54476461a8598667f4da2ca968b6c | |
| parent | 56c17ba4c7bfc1ed6df3d255f056053745835769 (diff) | |
| download | lua-87b0191753a9e379f75864b3295125348ab4263d.tar.gz lua-87b0191753a9e379f75864b3295125348ab4263d.tar.bz2 lua-87b0191753a9e379f75864b3295125348ab4263d.zip | |
better definition for LUAI_MAXCSTACK
| -rw-r--r-- | luaconf.h | 5 |
1 files changed, 3 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: luaconf.h,v 1.93 2007/11/26 16:56:11 roberto Exp roberto $ | 2 | ** $Id: luaconf.h,v 1.94 2008/01/02 16:36:19 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 | */ |
| @@ -415,7 +415,8 @@ | |||
| 415 | ** functions. This limit is arbitrary; its only purpose is to stop C | 415 | ** functions. This limit is arbitrary; its only purpose is to stop C |
| 416 | ** functions to consume unlimited stack space. | 416 | ** functions to consume unlimited stack space. |
| 417 | */ | 417 | */ |
| 418 | #define LUAI_MAXCSTACK ((int)((INT_MAX / (4*sizeof(LUA_NUMBER))) & 0xffff)) | 418 | #define LUAI_MCS_AUX ((int)(INT_MAX / (4*sizeof(LUA_NUMBER)))) |
| 419 | #define LUAI_MAXCSTACK (LUAI_MCS_AUX > SHRT_MAX ? SHRT_MAX : LUAI_MCS_AUX) | ||
| 419 | 420 | ||
| 420 | 421 | ||
| 421 | 422 | ||
