diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-12-05 18:15:18 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-12-05 18:15:18 -0200 |
commit | 592a309177edc52847b1196969ad6d49ba21f4fb (patch) | |
tree | 06add977885c012ee22cc4f105785c435b6af353 /lmathlib.c | |
parent | 413fc7334bf8ceaea71417d73edef15c99d3a793 (diff) | |
download | lua-592a309177edc52847b1196969ad6d49ba21f4fb.tar.gz lua-592a309177edc52847b1196969ad6d49ba21f4fb.tar.bz2 lua-592a309177edc52847b1196969ad6d49ba21f4fb.zip |
tag system replaced by event tables
Diffstat (limited to 'lmathlib.c')
-rw-r--r-- | lmathlib.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lmathlib.c,v 1.38 2001/03/26 14:31:49 roberto Exp $ | 2 | ** $Id: lmathlib.c,v 1.1 2001/11/29 22:14:34 rieru Exp rieru $ |
3 | ** Standard mathematical library | 3 | ** Standard mathematical library |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -220,6 +220,7 @@ static const luaL_reg mathlib[] = { | |||
220 | {"log10", math_log10}, | 220 | {"log10", math_log10}, |
221 | {"exp", math_exp}, | 221 | {"exp", math_exp}, |
222 | {"deg", math_deg}, | 222 | {"deg", math_deg}, |
223 | {"pow", math_pow}, | ||
223 | {"rad", math_rad}, | 224 | {"rad", math_rad}, |
224 | {"random", math_random}, | 225 | {"random", math_random}, |
225 | {"randomseed", math_randomseed} | 226 | {"randomseed", math_randomseed} |
@@ -230,8 +231,6 @@ static const luaL_reg mathlib[] = { | |||
230 | */ | 231 | */ |
231 | LUALIB_API int lua_mathlibopen (lua_State *L) { | 232 | LUALIB_API int lua_mathlibopen (lua_State *L) { |
232 | luaL_openl(L, mathlib); | 233 | luaL_openl(L, mathlib); |
233 | lua_pushcfunction(L, math_pow); | ||
234 | lua_settagmethod(L, LUA_TNUMBER, "pow"); | ||
235 | lua_pushnumber(L, PI); | 234 | lua_pushnumber(L, PI); |
236 | lua_setglobal(L, "PI"); | 235 | lua_setglobal(L, "PI"); |
237 | return 0; | 236 | return 0; |