summaryrefslogtreecommitdiff
path: root/lmathlib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1997-11-04 13:27:53 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1997-11-04 13:27:53 -0200
commit45cad43c3fedb13a5e424429fe94dc78ba01a118 (patch)
treee5dae021aa66accc06b6941add38bf2d495c6440 /lmathlib.c
parentdad5a01fb07e8a654f195ec3a9ca271cd5ee32e3 (diff)
downloadlua-45cad43c3fedb13a5e424429fe94dc78ba01a118.tar.gz
lua-45cad43c3fedb13a5e424429fe94dc78ba01a118.tar.bz2
lua-45cad43c3fedb13a5e424429fe94dc78ba01a118.zip
"lua_open": now lua has an explicit open operation.
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 a30dc03e..18967220 100644
--- a/lmathlib.c
+++ b/lmathlib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lmathlib.c,v 1.2 1997/10/24 17:44:22 roberto Exp roberto $ 2** $Id: lmathlib.c,v 1.3 1997/11/03 21:11:44 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*/
@@ -202,8 +202,8 @@ static struct luaL_reg mathlib[] = {
202*/ 202*/
203void lua_mathlibopen (void) 203void lua_mathlibopen (void)
204{ 204{
205 lua_pushstring("deg"); lua_setglobal("_TRIGMODE");
206 luaL_openlib(mathlib, (sizeof(mathlib)/sizeof(mathlib[0]))); 205 luaL_openlib(mathlib, (sizeof(mathlib)/sizeof(mathlib[0])));
206 lua_pushstring("deg"); lua_setglobal("_TRIGMODE");
207 lua_pushcfunction(math_pow); 207 lua_pushcfunction(math_pow);
208 lua_pushnumber(0); /* to get its tag */ 208 lua_pushnumber(0); /* to get its tag */
209 lua_settagmethod(lua_tag(lua_pop()), "pow"); 209 lua_settagmethod(lua_tag(lua_pop()), "pow");