From 6d4db86888ea8ef06b78646f2631891c9e4c7a2b Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 6 Mar 2001 17:09:38 -0300 Subject: open functions are lua_Cfunctions --- lmathlib.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lmathlib.c') diff --git a/lmathlib.c b/lmathlib.c index 4f6fb122..739426bb 100644 --- a/lmathlib.c +++ b/lmathlib.c @@ -1,5 +1,5 @@ /* -** $Id: lmathlib.c,v 1.35 2001/02/22 18:59:59 roberto Exp roberto $ +** $Id: lmathlib.c,v 1.36 2001/02/23 17:17:25 roberto Exp roberto $ ** Standard mathematical library ** See Copyright Notice in lua.h */ @@ -228,11 +228,12 @@ static const luaL_reg mathlib[] = { /* ** Open math library */ -LUALIB_API void lua_mathlibopen (lua_State *L) { +LUALIB_API int lua_mathlibopen (lua_State *L) { luaL_openl(L, mathlib); lua_pushcfunction(L, math_pow); lua_settagmethod(L, LUA_TNUMBER, l_s("pow")); lua_pushnumber(L, PI); lua_setglobal(L, l_s("PI")); + return 0; } -- cgit v1.2.3-55-g6feb