integer formats in 'string.format' may need to operate with larger-than-int

types
This commit is contained in:
Roberto Ierusalimschy
2005-12-15 16:53:34 -02:00
parent 43c61fc113
commit 9fbefdf69c
2 changed files with 58 additions and 21 deletions

View File

@@ -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
/* =================================================================== */