lua

A copy of the Lua development repository
Log | Files | Refs | README

commit be52f784d90a4a84a45a8c8474d2a8989b64f3a3
parent 144afa4d476c8a510ea93f02dd19dc20ce5e6c16
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Thu,  3 Apr 2014 11:17:37 -0300

new macros LUA_MAXINTEGER/LUA_MININTEGER

Diffstat:
Mluaconf.h | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git 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)) + /* }================================================================== */