aboutsummaryrefslogtreecommitdiff
path: root/lmathlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lmathlib.c')
-rw-r--r--lmathlib.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lmathlib.c b/lmathlib.c
index 4f6fb122..739426bb 100644
--- a/lmathlib.c
+++ b/lmathlib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lmathlib.c,v 1.35 2001/02/22 18:59:59 roberto Exp roberto $ 2** $Id: lmathlib.c,v 1.36 2001/02/23 17:17:25 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*/
@@ -228,11 +228,12 @@ static const luaL_reg mathlib[] = {
228/* 228/*
229** Open math library 229** Open math library
230*/ 230*/
231LUALIB_API void lua_mathlibopen (lua_State *L) { 231LUALIB_API int lua_mathlibopen (lua_State *L) {
232 luaL_openl(L, mathlib); 232 luaL_openl(L, mathlib);
233 lua_pushcfunction(L, math_pow); 233 lua_pushcfunction(L, math_pow);
234 lua_settagmethod(L, LUA_TNUMBER, l_s("pow")); 234 lua_settagmethod(L, LUA_TNUMBER, l_s("pow"));
235 lua_pushnumber(L, PI); 235 lua_pushnumber(L, PI);
236 lua_setglobal(L, l_s("PI")); 236 lua_setglobal(L, l_s("PI"));
237 return 0;
237} 238}
238 239