diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-04-03 11:18:02 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-04-03 11:18:02 -0300 |
commit | be52f784d90a4a84a45a8c8474d2a8989b64f3a3 (patch) | |
tree | 0cc63e375f6eb13ab7735f61fd0ce02eb8d460ca | |
parent | 144afa4d476c8a510ea93f02dd19dc20ce5e6c16 (diff) | |
download | lua-be52f784d90a4a84a45a8c8474d2a8989b64f3a3.tar.gz lua-be52f784d90a4a84a45a8c8474d2a8989b64f3a3.tar.bz2 lua-be52f784d90a4a84a45a8c8474d2a8989b64f3a3.zip |
new macros LUA_MAXINTEGER/LUA_MININTEGER
-rw-r--r-- | luaconf.h | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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 | ||