aboutsummaryrefslogtreecommitdiff
path: root/lmathlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lmathlib.c')
-rw-r--r--lmathlib.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lmathlib.c b/lmathlib.c
index fe01a89d..4999310a 100644
--- a/lmathlib.c
+++ b/lmathlib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lmathlib.c,v 1.70 2007/06/21 13:48:04 roberto Exp roberto $ 2** $Id: lmathlib.c,v 1.71 2009/02/18 13:06:05 roberto Exp roberto $
3** Standard mathematical library 3** Standard mathematical library
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -126,6 +126,10 @@ static int math_log (lua_State *L) {
126} 126}
127 127
128static int math_log10 (lua_State *L) { 128static int math_log10 (lua_State *L) {
129#if !defined(LUA_COMPAT_LOG10)
130 luaL_error(L, "function " LUA_QL("log10")
131 " is deprecated; use log(x, 10) instead");
132#endif
129 lua_pushnumber(L, log10(luaL_checknumber(L, 1))); 133 lua_pushnumber(L, log10(luaL_checknumber(L, 1)));
130 return 1; 134 return 1;
131} 135}