diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-05-03 16:30:17 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-05-03 16:30:17 -0300 |
| commit | d5fd44d747e9efce5875a0d08f6484f4187838bd (patch) | |
| tree | 17b9251d4ece07ef07e4c34a867de135a9394aef /luaconf.h | |
| parent | b0abc2ca03556a4483750c2c2389bd413710e36f (diff) | |
| download | lua-d5fd44d747e9efce5875a0d08f6484f4187838bd.tar.gz lua-d5fd44d747e9efce5875a0d08f6484f4187838bd.tar.bz2 lua-d5fd44d747e9efce5875a0d08f6484f4187838bd.zip | |
corrected definition of lua_number2int for Windows
Diffstat (limited to 'luaconf.h')
| -rw-r--r-- | luaconf.h | 12 |
1 files changed, 6 insertions, 6 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: luaconf.h,v 1.45 2005/04/27 18:37:51 roberto Exp roberto $ | 2 | ** $Id: luaconf.h,v 1.46 2005/04/29 13:53:59 roberto Exp $ |
| 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 | */ |
| @@ -421,10 +421,10 @@ | |||
| 421 | 421 | ||
| 422 | /* On Windows/Pentium, resort to assembler */ | 422 | /* On Windows/Pentium, resort to assembler */ |
| 423 | #elif !defined(__STRICT_ANSI__) && defined(_MSC_VER) && defined(_M_IX86) | 423 | #elif !defined(__STRICT_ANSI__) && defined(_MSC_VER) && defined(_M_IX86) |
| 424 | #define lua_number2int(i,d) __asm { \ | 424 | #define lua_number2int(i,d) \ |
| 425 | fld d \ | 425 | __asm fld d; \ |
| 426 | fistp i \ | 426 | __asm fistp i; |
| 427 | } | 427 | |
| 428 | 428 | ||
| 429 | /* on Pentium machines compliant with C99, you can try lrint */ | 429 | /* on Pentium machines compliant with C99, you can try lrint */ |
| 430 | #elif defined (__i386) && defined(__STDC_VERSION__) && \ | 430 | #elif defined (__i386) && defined(__STDC_VERSION__) && \ |
| @@ -445,7 +445,7 @@ | |||
| 445 | /* On a GNU or Windows/Pentium, resort to assembler */ | 445 | /* On a GNU or Windows/Pentium, resort to assembler */ |
| 446 | #if (defined(__GNUC__) && defined(__i386)) || \ | 446 | #if (defined(__GNUC__) && defined(__i386)) || \ |
| 447 | (defined(_MSC_VER) && defined(_M_IX86)) | 447 | (defined(_MSC_VER) && defined(_M_IX86)) |
| 448 | #define lua_number2integer(i,n) lua_number2int((i), (n)) | 448 | #define lua_number2integer(i,n) lua_number2int(i, n) |
| 449 | 449 | ||
| 450 | /* this option always work, but may be slow */ | 450 | /* this option always work, but may be slow */ |
| 451 | #else | 451 | #else |
