diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-12-15 16:53:34 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-12-15 16:53:34 -0200 |
| commit | 9fbefdf69c1491fd9105b0d717a9c574a266b610 (patch) | |
| tree | d96eb5bb8ec708301e658a8f20d847d03b484c06 /luaconf.h | |
| parent | 43c61fc11381a20376c15a6c0fd4f53912c43ccc (diff) | |
| download | lua-9fbefdf69c1491fd9105b0d717a9c574a266b610.tar.gz lua-9fbefdf69c1491fd9105b0d717a9c574a266b610.tar.bz2 lua-9fbefdf69c1491fd9105b0d717a9c574a266b610.zip | |
integer formats in 'string.format' may need to operate with larger-than-int
types
Diffstat (limited to 'luaconf.h')
| -rw-r--r-- | luaconf.h | 22 |
1 files changed, 21 insertions, 1 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: luaconf.h,v 1.74 2005/11/16 16:24:28 roberto Exp roberto $ | 2 | ** $Id: luaconf.h,v 1.75 2005/11/25 13:29:11 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 | */ |
| @@ -708,6 +708,26 @@ union luai_Cast { double l_d; long l_l; }; | |||
| 708 | #define luai_userstateyield(L,n) ((void)L) | 708 | #define luai_userstateyield(L,n) ((void)L) |
| 709 | 709 | ||
| 710 | 710 | ||
| 711 | /* | ||
| 712 | @@ LUA_INTFRMLEN is the length modifier for integer conversions | ||
| 713 | @* in 'string.fomat'. | ||
| 714 | @@ LUA_INTFRM_T is the integer type correspoding to the previous length | ||
| 715 | @* modifier. | ||
| 716 | ** CHANGE them if your system supports long long or does not support long. | ||
| 717 | */ | ||
| 718 | |||
| 719 | #if defined(LUA_USELONGLONG) | ||
| 720 | |||
| 721 | #define LUA_INTFRMLEN "ll" | ||
| 722 | #define LUA_INTFRM_T long long | ||
| 723 | |||
| 724 | #else | ||
| 725 | |||
| 726 | #define LUA_INTFRMLEN "l" | ||
| 727 | #define LUA_INTFRM_T long | ||
| 728 | |||
| 729 | #endif | ||
| 730 | |||
| 711 | 731 | ||
| 712 | 732 | ||
| 713 | /* =================================================================== */ | 733 | /* =================================================================== */ |
