diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-06-01 21:03:16 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-06-01 21:03:16 -0300 |
commit | 11aefa447827972064e2d51b6c5ce3a3aede01cf (patch) | |
tree | 04313a7d09edc52252ea8f25064c667c0557ae21 /luaconf.h | |
parent | 5ebdd326b625f32d34ac4036a97d7c565499eaf8 (diff) | |
download | lua-11aefa447827972064e2d51b6c5ce3a3aede01cf.tar.gz lua-11aefa447827972064e2d51b6c5ce3a3aede01cf.tar.bz2 lua-11aefa447827972064e2d51b6c5ce3a3aede01cf.zip |
details (comments)
Diffstat (limited to 'luaconf.h')
-rw-r--r-- | luaconf.h | 16 |
1 files changed, 7 insertions, 9 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: luaconf.h,v 1.204 2014/05/26 17:10:22 roberto Exp roberto $ | 2 | ** $Id: luaconf.h,v 1.205 2014/05/27 13:59:03 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 | */ |
@@ -507,18 +507,16 @@ | |||
507 | 507 | ||
508 | /* | 508 | /* |
509 | @@ lua_numtointeger converts a float number to an integer, or | 509 | @@ lua_numtointeger converts a float number to an integer, or |
510 | ** return 0 if float is not within the range of a lua_Integer. | 510 | ** returns 0 if float is not within the range of a lua_Integer. |
511 | ** (The comparisons are tricky because of rounding. | 511 | ** (The range comparisons are tricky because of rounding. The tests |
512 | ** The tests here assume a two-complement representation, where | 512 | ** here assume a two-complement representation, where MININTEGER always |
513 | ** MININTEGER always has an exact representation as a float, | 513 | ** has an exact representation as a float; MAXINTEGER may not have one, |
514 | ** while LUA_MAXINTEGER may not have one, and therefore its | 514 | ** and therefore its conversion to float may have an ill-defined value.) |
515 | ** conversion to float may have an ill-defined value.) | ||
516 | ** This macro should be used only when 'n' has an integral value. | ||
517 | */ | 515 | */ |
518 | #define lua_numtointeger(n,p) \ | 516 | #define lua_numtointeger(n,p) \ |
519 | ((n) >= (LUA_NUMBER)(LUA_MININTEGER) && \ | 517 | ((n) >= (LUA_NUMBER)(LUA_MININTEGER) && \ |
520 | (n) < -(LUA_NUMBER)(LUA_MININTEGER) && \ | 518 | (n) < -(LUA_NUMBER)(LUA_MININTEGER) && \ |
521 | (*p = (LUA_INTEGER)(n), 1)) | 519 | (*(p) = (LUA_INTEGER)(n), 1)) |
522 | 520 | ||
523 | 521 | ||
524 | /* | 522 | /* |