From 46f1429936ff7cde274f9896d022ab494567ee7a Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 17 Dec 2009 10:50:20 -0200 Subject: more options moved from luaconf.h into internal files --- lstrlib.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'lstrlib.c') diff --git a/lstrlib.c b/lstrlib.c index 09382c6b..c34a82ef 100644 --- a/lstrlib.c +++ b/lstrlib.c @@ -1,5 +1,5 @@ /* -** $Id: lstrlib.c,v 1.145 2009/11/26 16:49:28 roberto Exp roberto $ +** $Id: lstrlib.c,v 1.146 2009/12/17 12:26:09 roberto Exp roberto $ ** Standard library for string operations and pattern-matching ** See Copyright Notice in lua.h */ @@ -698,6 +698,24 @@ static int str_gsub (lua_State *L) { /* }====================================================== */ +/* +** length modifier for integer conversions ** in 'string.format' and +** integer type corresponding to the previous length +*/ + +#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 + + /* maximum size of each formatted item (> len(format('%99.99f', -1e308))) */ #define MAX_ITEM 512 /* valid flags in a format specification */ -- cgit v1.2.3-55-g6feb