commit de0bfe33b7380fcf165b95dd36895865e1321226
parent 9768e2f6819842ff39bced5ba979e787024caac9
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Wed, 6 Apr 2005 14:29:51 -0300
new definition for `lua_number2int' for Windows (not tested yet!)
Diffstat:
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/luaconf.h b/luaconf.h
@@ -1,5 +1,5 @@
/*
-** $Id: luaconf.h,v 1.39 2005/03/29 14:30:16 roberto Exp roberto $
+** $Id: luaconf.h,v 1.40 2005/03/29 16:20:48 roberto Exp roberto $
** Configuration file for Lua
** See Copyright Notice in lua.h
*/
@@ -407,16 +407,10 @@
/* On Windows/Pentium, resort to assembler */
#elif !defined(__STRICT_ANSI__) && defined(_MSC_VER) && defined(_M_IX86)
-#pragma warning(disable: 4514)
-__inline int l_lrint (double flt)
-{ int i;
- _asm {
- fld flt
- fistp i
- };
- return i;
-}
-#define lua_number2int(i,d) ((i)=l_lrint((d)))
+#define lua_number2int(i,d) __asm { \
+ fld d \
+ fistp i \
+ }
/* on Pentium machines compliant with C99, you can try lrint */
#elif defined (__i386) && defined(__STDC_VERSION__) && \