From 453450d68751f74f0fab44bd96725a5606d2d9a1 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 20 Jun 2013 12:02:49 -0300 Subject: new macro 'l_floor' (allows 'floorf' even when other math operations do not have an 'f' variant) --- lapi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lapi.c') diff --git a/lapi.c b/lapi.c index 8515f5a0..51f782f0 100644 --- a/lapi.c +++ b/lapi.c @@ -1,5 +1,5 @@ /* -** $Id: lapi.c,v 2.181 2013/06/04 19:34:51 roberto Exp roberto $ +** $Id: lapi.c,v 2.182 2013/06/14 18:32:45 roberto Exp roberto $ ** Lua API ** See Copyright Notice in lua.h */ @@ -390,7 +390,7 @@ LUA_API lua_Unsigned lua_tounsignedx (lua_State *L, int idx, int *pisnum) { const lua_Number twop = (~(lua_Unsigned)0) + cast_num(1); lua_Number n = fltvalue(o); int neg = 0; - n = l_mathop(floor)(n); + n = l_floor(n); if (n < 0) { neg = 1; n = -n; -- cgit v1.2.3-55-g6feb