commit 953d499ea25b95560dc53e97bcbdc2dab40d1dbf
parent a541ada194634c72be5d174159b86ab2aa17a5c3
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Mon, 11 Jan 2010 14:34:56 -0200
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.
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/luaconf.h b/luaconf.h
@@ -1,5 +1,5 @@
/*
-** $Id: luaconf.h,v 1.126 2009/12/28 16:30:31 roberto Exp roberto $
+** $Id: luaconf.h,v 1.127 2010/01/06 15:15:04 roberto Exp roberto $
** Configuration file for Lua
** See Copyright Notice in lua.h
*/
@@ -440,8 +440,9 @@ LUA_API int (lua_cpcall) (lua_State *L, lua_CFunction func, void *ud);
/* On a Microsoft compiler, use assembler */
#if defined(_MSC_VER)
-#define lua_number2int(i,d) __asm fld d __asm fistp i
+#define lua_number2int(i,d) {__asm fld d __asm fistp i}
#define lua_number2integer(i,n) lua_number2int(i, n)
+#define lua_number2uint(i,n) lua_number2int(i, n)
#else
/* the next trick should work on any Pentium, but sometimes clashes