diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-02-18 10:17:10 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-02-18 10:17:10 -0300 |
| commit | a1d0e1a11adf5fac8f30cc3cf1da6162174a5ce9 (patch) | |
| tree | d0dad82c4c237c91eef985542f0d1abb7730a704 /lmathlib.c | |
| parent | 897573983977e2bdfe405bd056abccc1db1e0f8d (diff) | |
| download | lua-a1d0e1a11adf5fac8f30cc3cf1da6162174a5ce9.tar.gz lua-a1d0e1a11adf5fac8f30cc3cf1da6162174a5ce9.tar.bz2 lua-a1d0e1a11adf5fac8f30cc3cf1da6162174a5ce9.zip | |
'log10' is deprecated now
Diffstat (limited to 'lmathlib.c')
| -rw-r--r-- | lmathlib.c | 6 |
1 files changed, 5 insertions, 1 deletions
| @@ -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 | ||
| 128 | static int math_log10 (lua_State *L) { | 128 | static 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 | } |
