From de0bfe33b7380fcf165b95dd36895865e1321226 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 6 Apr 2005 14:30:13 -0300 Subject: new definition for `lua_number2int' for Windows (not tested yet!) --- luaconf.h | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'luaconf.h') diff --git a/luaconf.h b/luaconf.h index 9f86f962..83221e8b 100644 --- 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__) && \ -- cgit v1.2.3-55-g6feb