diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2012-10-02 14:32:44 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2012-10-02 14:32:44 -0300 |
| commit | d58ce8106ef59366008cf23c68bc1fe3fb81eea4 (patch) | |
| tree | 62cee7871f756afa9f145ff8a1eb73f9748c9f6f | |
| parent | 31f7d553e413385143edc8f253a5db5fb5462e07 (diff) | |
| download | lua-d58ce8106ef59366008cf23c68bc1fe3fb81eea4.tar.gz lua-d58ce8106ef59366008cf23c68bc1fe3fb81eea4.tar.bz2 lua-d58ce8106ef59366008cf23c68bc1fe3fb81eea4.zip | |
macro 'lua_number2unsigned' also needs proper definition if
lua_Number is float
| -rw-r--r-- | llimits.h | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: llimits.h,v 1.99 2012/05/28 20:32:28 roberto Exp roberto $ | 2 | ** $Id: llimits.h,v 1.100 2012/10/01 14:14:45 roberto Exp roberto $ |
| 3 | ** Limits, basic types, and some other `installation-dependent' definitions | 3 | ** Limits, basic types, and some other `installation-dependent' definitions |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -256,7 +256,7 @@ union luai_Cast { double l_d; LUA_INT32 l_p[2]; }; | |||
| 256 | 256 | ||
| 257 | #if !defined(lua_number2unsigned) /* { */ | 257 | #if !defined(lua_number2unsigned) /* { */ |
| 258 | /* the following definition assures proper modulo behavior */ | 258 | /* the following definition assures proper modulo behavior */ |
| 259 | #if defined(LUA_NUMBER_DOUBLE) | 259 | #if defined(LUA_NUMBER_DOUBLE) || defined(LUA_NUMBER_FLOAT) |
| 260 | #include <math.h> | 260 | #include <math.h> |
| 261 | #define SUPUNSIGNED ((lua_Number)(~(lua_Unsigned)0) + 1) | 261 | #define SUPUNSIGNED ((lua_Number)(~(lua_Unsigned)0) + 1) |
| 262 | #define lua_number2unsigned(i,n) \ | 262 | #define lua_number2unsigned(i,n) \ |
