summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-04-03 11:18:02 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-04-03 11:18:02 -0300
commitbe52f784d90a4a84a45a8c8474d2a8989b64f3a3 (patch)
tree0cc63e375f6eb13ab7735f61fd0ce02eb8d460ca
parent144afa4d476c8a510ea93f02dd19dc20ce5e6c16 (diff)
downloadlua-be52f784d90a4a84a45a8c8474d2a8989b64f3a3.tar.gz
lua-be52f784d90a4a84a45a8c8474d2a8989b64f3a3.tar.bz2
lua-be52f784d90a4a84a45a8c8474d2a8989b64f3a3.zip
new macros LUA_MAXINTEGER/LUA_MININTEGER
-rw-r--r--luaconf.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/luaconf.h b/luaconf.h
index aee4b0fb..3e4ae5f1 100644
--- a/luaconf.h
+++ b/luaconf.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: luaconf.h,v 1.192 2014/03/18 18:27:08 roberto Exp roberto $ 2** $Id: luaconf.h,v 1.193 2014/03/21 14:27:16 roberto Exp roberto $
3** Configuration file for Lua 3** Configuration file for Lua
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -531,6 +531,8 @@
531@@ LUA_INTEGER_FRMLEN is the length modifier for reading/writing integers. 531@@ LUA_INTEGER_FRMLEN is the length modifier for reading/writing integers.
532@@ LUA_INTEGER_SCAN is the format for reading integers. 532@@ LUA_INTEGER_SCAN is the format for reading integers.
533@@ LUA_INTEGER_FMT is the format for writing integers. 533@@ LUA_INTEGER_FMT is the format for writing integers.
534@@ LUA_MAXINTEGER is the maximum value for a LUA_INTEGER.
535@@ LUA_MININTEGER is the minimum value for a LUA_INTEGER.
534@@ lua_integer2str converts an integer to a string. 536@@ lua_integer2str converts an integer to a string.
535*/ 537*/
536 538
@@ -567,6 +569,9 @@
567 569
568#define LUA_UNSIGNED unsigned LUA_INTEGER 570#define LUA_UNSIGNED unsigned LUA_INTEGER
569 571
572#define LUA_MAXINTEGER ((LUA_INTEGER)(~(LUA_UNSIGNED)0 >> 1))
573#define LUA_MININTEGER ((LUA_INTEGER)~(~(LUA_UNSIGNED)0 >> 1))
574
570/* }================================================================== */ 575/* }================================================================== */
571 576
572 577