diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-01-11 14:35:20 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-01-11 14:35:20 -0200 |
| commit | 953d499ea25b95560dc53e97bcbdc2dab40d1dbf (patch) | |
| tree | a9c326ee69295f4df9c68036111e1719d8bd86b5 | |
| parent | a541ada194634c72be5d174159b86ab2aa17a5c3 (diff) | |
| download | lua-953d499ea25b95560dc53e97bcbdc2dab40d1dbf.tar.gz lua-953d499ea25b95560dc53e97bcbdc2dab40d1dbf.tar.bz2 lua-953d499ea25b95560dc53e97bcbdc2dab40d1dbf.zip | |
changed macro lua_number2int for Windows (added brackets; some recent
compilers complain about the old format) + added missing definition
for 'lua_number2int' in Windows case.
| -rw-r--r-- | luaconf.h | 5 |
1 files changed, 3 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: luaconf.h,v 1.126 2009/12/28 16:30:31 roberto Exp roberto $ | 2 | ** $Id: luaconf.h,v 1.127 2010/01/06 15:15:04 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 | */ |
| @@ -440,8 +440,9 @@ LUA_API int (lua_cpcall) (lua_State *L, lua_CFunction func, void *ud); | |||
| 440 | /* On a Microsoft compiler, use assembler */ | 440 | /* On a Microsoft compiler, use assembler */ |
| 441 | #if defined(_MSC_VER) | 441 | #if defined(_MSC_VER) |
| 442 | 442 | ||
| 443 | #define lua_number2int(i,d) __asm fld d __asm fistp i | 443 | #define lua_number2int(i,d) {__asm fld d __asm fistp i} |
| 444 | #define lua_number2integer(i,n) lua_number2int(i, n) | 444 | #define lua_number2integer(i,n) lua_number2int(i, n) |
| 445 | #define lua_number2uint(i,n) lua_number2int(i, n) | ||
| 445 | 446 | ||
| 446 | #else | 447 | #else |
| 447 | /* the next trick should work on any Pentium, but sometimes clashes | 448 | /* the next trick should work on any Pentium, but sometimes clashes |
