aboutsummaryrefslogtreecommitdiff
path: root/lauxlib.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 /lauxlib.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 'lauxlib.c')
-rw-r--r--lauxlib.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lauxlib.c b/lauxlib.c
index bc602141..296becc2 100644
--- a/lauxlib.c
+++ b/lauxlib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lauxlib.c,v 1.1 1997/09/16 19:25:59 roberto Exp roberto $ 2** $Id: lauxlib.c,v 1.2 1997/09/26 15:02:26 roberto Exp roberto $
3** Auxiliar functions for building Lua libraries 3** Auxiliar functions for building Lua libraries
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -67,6 +67,7 @@ lua_Object luaL_nonnullarg (int numArg)
67void luaL_openlib (struct luaL_reg *l, int n) 67void luaL_openlib (struct luaL_reg *l, int n)
68{ 68{
69 int i; 69 int i;
70 lua_open(); /* make sure lua is already open */
70 for (i=0; i<n; i++) 71 for (i=0; i<n; i++)
71 lua_register(l[i].name, l[i].func); 72 lua_register(l[i].name, l[i].func);
72} 73}