summaryrefslogtreecommitdiff
path: root/lmathlib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-08-15 11:12:32 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-08-15 11:12:32 -0300
commit5e8a9e324ccdba03b326f8a8fafa0446042975a5 (patch)
tree0f752977249376dffd9a65690c1663be81166825 /lmathlib.c
parent16ddf86168998d500283e160977ef5ecea72c915 (diff)
downloadlua-5e8a9e324ccdba03b326f8a8fafa0446042975a5.tar.gz
lua-5e8a9e324ccdba03b326f8a8fafa0446042975a5.tar.bz2
lua-5e8a9e324ccdba03b326f8a8fafa0446042975a5.zip
luaL_openlib -> luaL_register, luaL_putchar -> luaL_addchar
Diffstat (limited to '')
-rw-r--r--lmathlib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lmathlib.c b/lmathlib.c
index 17253b28..45c204f9 100644
--- a/lmathlib.c
+++ b/lmathlib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lmathlib.c,v 1.64 2005/06/13 21:20:14 roberto Exp roberto $ 2** $Id: lmathlib.c,v 1.65 2005/07/11 23:58:35 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*/
@@ -249,7 +249,7 @@ static const luaL_reg mathlib[] = {
249** Open math library 249** Open math library
250*/ 250*/
251LUALIB_API int luaopen_math (lua_State *L) { 251LUALIB_API int luaopen_math (lua_State *L) {
252 luaL_openlib(L, LUA_MATHLIBNAME, mathlib, 0); 252 luaL_register(L, LUA_MATHLIBNAME, mathlib);
253 lua_pushnumber(L, PI); 253 lua_pushnumber(L, PI);
254 lua_setfield(L, -2, "pi"); 254 lua_setfield(L, -2, "pi");
255 lua_pushnumber(L, HUGE_VAL); 255 lua_pushnumber(L, HUGE_VAL);