aboutsummaryrefslogtreecommitdiff
path: root/lmathlib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2009-02-18 10:17:10 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2009-02-18 10:17:10 -0300
commita1d0e1a11adf5fac8f30cc3cf1da6162174a5ce9 (patch)
treed0dad82c4c237c91eef985542f0d1abb7730a704 /lmathlib.c
parent897573983977e2bdfe405bd056abccc1db1e0f8d (diff)
downloadlua-a1d0e1a11adf5fac8f30cc3cf1da6162174a5ce9.tar.gz
lua-a1d0e1a11adf5fac8f30cc3cf1da6162174a5ce9.tar.bz2
lua-a1d0e1a11adf5fac8f30cc3cf1da6162174a5ce9.zip
'log10' is deprecated now
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}