From 9fbefdf69c1491fd9105b0d717a9c574a266b610 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 15 Dec 2005 16:53:34 -0200 Subject: integer formats in 'string.format' may need to operate with larger-than-int types --- luaconf.h | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'luaconf.h') diff --git a/luaconf.h b/luaconf.h index 3370b9df..a0504e0f 100644 --- a/luaconf.h +++ b/luaconf.h @@ -1,5 +1,5 @@ /* -** $Id: luaconf.h,v 1.74 2005/11/16 16:24:28 roberto Exp roberto $ +** $Id: luaconf.h,v 1.75 2005/11/25 13:29:11 roberto Exp roberto $ ** Configuration file for Lua ** See Copyright Notice in lua.h */ @@ -708,6 +708,26 @@ union luai_Cast { double l_d; long l_l; }; #define luai_userstateyield(L,n) ((void)L) +/* +@@ LUA_INTFRMLEN is the length modifier for integer conversions +@* in 'string.fomat'. +@@ LUA_INTFRM_T is the integer type correspoding to the previous length +@* modifier. +** CHANGE them if your system supports long long or does not support long. +*/ + +#if defined(LUA_USELONGLONG) + +#define LUA_INTFRMLEN "ll" +#define LUA_INTFRM_T long long + +#else + +#define LUA_INTFRMLEN "l" +#define LUA_INTFRM_T long + +#endif + /* =================================================================== */ -- cgit v1.2.3-55-g6feb