summaryrefslogtreecommitdiff
path: root/lmathlib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1999-11-22 15:39:51 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1999-11-22 15:39:51 -0200
commit7d1499ba88fbb9275b6e5dea6005a49ff15347dd (patch)
tree3effbdda4848b26de22e12d8dd14d6c9e3da518b /lmathlib.c
parent29ede6aa13144ff7b69c57a87be1ee93f57ae896 (diff)
downloadlua-7d1499ba88fbb9275b6e5dea6005a49ff15347dd.tar.gz
lua-7d1499ba88fbb9275b6e5dea6005a49ff15347dd.tar.bz2
lua-7d1499ba88fbb9275b6e5dea6005a49ff15347dd.zip
new macro luaL_openl
Diffstat (limited to 'lmathlib.c')
-rw-r--r--lmathlib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lmathlib.c b/lmathlib.c
index ee688a50..83c8e0bc 100644
--- a/lmathlib.c
+++ b/lmathlib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lmathlib.c,v 1.19 1999/08/18 14:40:51 roberto Exp roberto $ 2** $Id: lmathlib.c,v 1.20 1999/11/22 13:12:07 roberto Exp roberto $
3** Lua standard mathematical library 3** Lua standard mathematical library
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -199,7 +199,7 @@ static const struct luaL_reg mathlib[] = {
199** Open math library 199** Open math library
200*/ 200*/
201void lua_mathlibopen (lua_State *L) { 201void lua_mathlibopen (lua_State *L) {
202 luaL_openlib(L, mathlib, (sizeof(mathlib)/sizeof(mathlib[0]))); 202 luaL_openl(L, mathlib);
203 lua_pushcfunction(L, math_pow); 203 lua_pushcfunction(L, math_pow);
204 lua_pushnumber(L, 0); /* to get its tag */ 204 lua_pushnumber(L, 0); /* to get its tag */
205 lua_settagmethod(L, lua_tag(L, lua_pop(L)), "pow"); 205 lua_settagmethod(L, lua_tag(L, lua_pop(L)), "pow");