aboutsummaryrefslogtreecommitdiff
path: root/mathlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'mathlib.c')
-rw-r--r--mathlib.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mathlib.c b/mathlib.c
index 17e301da..bb33db08 100644
--- a/mathlib.c
+++ b/mathlib.c
@@ -3,7 +3,7 @@
3** Mathematics library to LUA 3** Mathematics library to LUA
4*/ 4*/
5 5
6char *rcs_mathlib="$Id: mathlib.c,v 1.23 1997/04/06 14:08:08 roberto Exp roberto $"; 6char *rcs_mathlib="$Id: mathlib.c,v 1.24 1997/06/09 17:30:10 roberto Exp roberto $";
7 7
8#include <stdlib.h> 8#include <stdlib.h>
9#include <math.h> 9#include <math.h>
@@ -210,7 +210,8 @@ static struct luaL_reg mathlib[] = {
210void mathlib_open (void) 210void mathlib_open (void)
211{ 211{
212 luaL_openlib(mathlib, (sizeof(mathlib)/sizeof(mathlib[0]))); 212 luaL_openlib(mathlib, (sizeof(mathlib)/sizeof(mathlib[0])));
213 lua_pushcfunction(math_pow);
213 lua_pushnumber(0); /* to get its tag */ 214 lua_pushnumber(0); /* to get its tag */
214 lua_settagmethod(lua_tag(lua_pop()), "pow", math_pow); 215 lua_settagmethod(lua_tag(lua_pop()), "pow");
215} 216}
216 217