From 953d499ea25b95560dc53e97bcbdc2dab40d1dbf Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 11 Jan 2010 14:35:20 -0200 Subject: [PATCH] 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. --- luaconf.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/luaconf.h b/luaconf.h index 91204a3a..3e0bfb77 100644 --- 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