aboutsummaryrefslogtreecommitdiff
path: root/lmathlib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2003-11-05 09:59:14 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2003-11-05 09:59:14 -0200
commitfa198197a0202bd3a7b68d228cd1c2fd88166ff7 (patch)
tree536f37e38fb5e80fa580c42f2d09d6e10410e075 /lmathlib.c
parent1e944de6cb6a20f6abeaab6f5d1039d06d8d2812 (diff)
downloadlua-fa198197a0202bd3a7b68d228cd1c2fd88166ff7.tar.gz
lua-fa198197a0202bd3a7b68d228cd1c2fd88166ff7.tar.bz2
lua-fa198197a0202bd3a7b68d228cd1c2fd88166ff7.zip
lua_(set)getglobal are ok to use
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 c9397376..5c060218 100644
--- a/lmathlib.c
+++ b/lmathlib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lmathlib.c,v 1.57 2003/10/07 20:13:41 roberto Exp roberto $ 2** $Id: lmathlib.c,v 1.58 2003/10/10 12:57:55 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*/
@@ -238,7 +238,7 @@ LUALIB_API int luaopen_math (lua_State *L) {
238 lua_pushnumber(L, PI); 238 lua_pushnumber(L, PI);
239 lua_setfield(L, -2, "pi"); 239 lua_setfield(L, -2, "pi");
240 lua_pushcfunction(L, math_pow); 240 lua_pushcfunction(L, math_pow);
241 lua_setfield(L, LUA_GLOBALSINDEX, "__pow"); 241 lua_setglobal(L, "__pow");
242 return 1; 242 return 1;
243} 243}
244 244