From be52f784d90a4a84a45a8c8474d2a8989b64f3a3 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 3 Apr 2014 11:18:02 -0300 Subject: new macros LUA_MAXINTEGER/LUA_MININTEGER --- luaconf.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/luaconf.h b/luaconf.h index aee4b0fb..3e4ae5f1 100644 --- a/luaconf.h +++ b/luaconf.h @@ -1,5 +1,5 @@ /* -** $Id: luaconf.h,v 1.192 2014/03/18 18:27:08 roberto Exp roberto $ +** $Id: luaconf.h,v 1.193 2014/03/21 14:27:16 roberto Exp roberto $ ** Configuration file for Lua ** See Copyright Notice in lua.h */ @@ -531,6 +531,8 @@ @@ LUA_INTEGER_FRMLEN is the length modifier for reading/writing integers. @@ LUA_INTEGER_SCAN is the format for reading integers. @@ LUA_INTEGER_FMT is the format for writing integers. +@@ LUA_MAXINTEGER is the maximum value for a LUA_INTEGER. +@@ LUA_MININTEGER is the minimum value for a LUA_INTEGER. @@ lua_integer2str converts an integer to a string. */ @@ -567,6 +569,9 @@ #define LUA_UNSIGNED unsigned LUA_INTEGER +#define LUA_MAXINTEGER ((LUA_INTEGER)(~(LUA_UNSIGNED)0 >> 1)) +#define LUA_MININTEGER ((LUA_INTEGER)~(~(LUA_UNSIGNED)0 >> 1)) + /* }================================================================== */ -- cgit v1.2.3-55-g6feb