diff options
Diffstat (limited to 'luaconf.h')
-rw-r--r-- | luaconf.h | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: luaconf.h,v 1.262 2017/12/07 18:53:33 roberto Exp roberto $ | 2 | ** $Id: luaconf.h,v 1.263 2017/12/30 20:46:18 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 | */ |
@@ -437,12 +437,13 @@ | |||
437 | l_sprintf((s), sz, LUA_NUMBER_FMT, (LUAI_UACNUMBER)(n)) | 437 | l_sprintf((s), sz, LUA_NUMBER_FMT, (LUAI_UACNUMBER)(n)) |
438 | 438 | ||
439 | /* | 439 | /* |
440 | @@ lua_numbertointeger converts a float number to an integer, or | 440 | @@ lua_numbertointeger converts a float number with an integral value |
441 | ** returns 0 if float is not within the range of a lua_Integer. | 441 | ** to an integer, or returns 0 if float is not within the range of |
442 | ** (The range comparisons are tricky because of rounding. The tests | 442 | ** a lua_Integer. (The range comparisons are tricky because of |
443 | ** here assume a two-complement representation, where MININTEGER always | 443 | ** rounding. The tests here assume a two-complement representation, |
444 | ** has an exact representation as a float; MAXINTEGER may not have one, | 444 | ** where MININTEGER always has an exact representation as a float; |
445 | ** and therefore its conversion to float may have an ill-defined value.) | 445 | ** MAXINTEGER may not have one, and therefore its conversion to float |
446 | ** may have an ill-defined value.) | ||
446 | */ | 447 | */ |
447 | #define lua_numbertointeger(n,p) \ | 448 | #define lua_numbertointeger(n,p) \ |
448 | ((n) >= (LUA_NUMBER)(LUA_MININTEGER) && \ | 449 | ((n) >= (LUA_NUMBER)(LUA_MININTEGER) && \ |