new definition for `lua_number2int' for Windows (not tested yet!)
This commit is contained in:
16
luaconf.h
16
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
|
** Configuration file for Lua
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@@ -407,16 +407,10 @@
|
|||||||
|
|
||||||
/* On Windows/Pentium, resort to assembler */
|
/* On Windows/Pentium, resort to assembler */
|
||||||
#elif !defined(__STRICT_ANSI__) && defined(_MSC_VER) && defined(_M_IX86)
|
#elif !defined(__STRICT_ANSI__) && defined(_MSC_VER) && defined(_M_IX86)
|
||||||
#pragma warning(disable: 4514)
|
#define lua_number2int(i,d) __asm { \
|
||||||
__inline int l_lrint (double flt)
|
fld d \
|
||||||
{ int i;
|
fistp i \
|
||||||
_asm {
|
}
|
||||||
fld flt
|
|
||||||
fistp i
|
|
||||||
};
|
|
||||||
return i;
|
|
||||||
}
|
|
||||||
#define lua_number2int(i,d) ((i)=l_lrint((d)))
|
|
||||||
|
|
||||||
/* on Pentium machines compliant with C99, you can try lrint */
|
/* on Pentium machines compliant with C99, you can try lrint */
|
||||||
#elif defined (__i386) && defined(__STDC_VERSION__) && \
|
#elif defined (__i386) && defined(__STDC_VERSION__) && \
|
||||||
|
|||||||
Reference in New Issue
Block a user