From 0d88545b82b82671904474499b5d312141170ab6 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 3 Apr 2003 10:35:34 -0300 Subject: warnings from several compilers (mainly typecasts when lua_Number is float) --- lauxlib.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lauxlib.h') diff --git a/lauxlib.h b/lauxlib.h index 5969cbf8..25f3c441 100644 --- a/lauxlib.h +++ b/lauxlib.h @@ -1,5 +1,5 @@ /* -** $Id: lauxlib.h,v 1.58 2003/02/11 15:32:31 roberto Exp roberto $ +** $Id: lauxlib.h,v 1.59 2003/03/18 12:25:32 roberto Exp roberto $ ** Auxiliary functions for building Lua libraries ** See Copyright Notice in lua.h */ @@ -76,8 +76,8 @@ LUALIB_API int luaL_loadbuffer (lua_State *L, const char *buff, size_t sz, #define luaL_optstring(L,n,d) (luaL_optlstring(L, (n), (d), NULL)) #define luaL_checkint(L,n) ((int)luaL_checknumber(L, n)) #define luaL_checklong(L,n) ((long)luaL_checknumber(L, n)) -#define luaL_optint(L,n,d) ((int)luaL_optnumber(L, n,d)) -#define luaL_optlong(L,n,d) ((long)luaL_optnumber(L, n,d)) +#define luaL_optint(L,n,d) ((int)luaL_optnumber(L, n,(lua_Number)(d))) +#define luaL_optlong(L,n,d) ((long)luaL_optnumber(L, n,(lua_Number)(d))) /* -- cgit v1.2.3-55-g6feb