From 79cbc3468caeab89b1c8492d54e1c28e7aafd1ed Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 5 Jul 2011 09:49:35 -0300 Subject: removed and deprecated functions really removed from the code base --- lmathlib.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'lmathlib.c') diff --git a/lmathlib.c b/lmathlib.c index 39069ed0..035dd090 100644 --- a/lmathlib.c +++ b/lmathlib.c @@ -1,5 +1,5 @@ /* -** $Id: lmathlib.c,v 1.78 2010/11/12 15:47:34 roberto Exp roberto $ +** $Id: lmathlib.c,v 1.79 2010/11/18 18:38:27 roberto Exp roberto $ ** Standard mathematical library ** See Copyright Notice in lua.h */ @@ -134,15 +134,12 @@ static int math_log (lua_State *L) { return 1; } +#if defined(LUA_COMPAT_LOG10) static int math_log10 (lua_State *L) { -#if !defined(LUA_COMPAT_LOG10) - return luaL_error(L, "function " LUA_QL("log10") - " is deprecated; use log(x, 10) instead"); -#else lua_pushnumber(L, l_tg(log10)(luaL_checknumber(L, 1))); return 1; -#endif } +#endif static int math_exp (lua_State *L) { lua_pushnumber(L, l_tg(exp)(luaL_checknumber(L, 1))); @@ -252,7 +249,9 @@ static const luaL_Reg mathlib[] = { {"fmod", math_fmod}, {"frexp", math_frexp}, {"ldexp", math_ldexp}, +#if defined(LUA_COMPAT_LOG10) {"log10", math_log10}, +#endif {"log", math_log}, {"max", math_max}, {"min", math_min}, -- cgit v1.2.3-55-g6feb