lua

A copy of the Lua development repository
Log | Files | Refs | README

commit 3bb5079dd485a5abeb79b4597636b6e5a167dc58
parent 5016f43aa439662ca35a5d78e820c617c517f60a
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Wed,  7 Aug 2002 17:53:55 -0300

ensure fixed order for library initialization

Diffstat:
Mlua.c | 19++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/lua.c b/lua.c @@ -1,5 +1,5 @@ /* -** $Id: lua.c,v 1.98 2002/08/06 15:32:22 roberto Exp roberto $ +** $Id: lua.c,v 1.99 2002/08/06 18:01:50 roberto Exp roberto $ ** Lua stand-alone interpreter ** See Copyright Notice in lua.h */ @@ -337,14 +337,15 @@ static int handle_argv (char *argv[], int *interactive) { static int openstdlibs (lua_State *l) { - return lua_baselibopen(l) + - lua_tablibopen(l) + - lua_iolibopen(l) + - lua_strlibopen(l) + - lua_mathlibopen(l) + - lua_dblibopen(l) + - /* add your libraries here */ - 0; + int res = 0; + res += lua_baselibopen(l); + res += lua_tablibopen(l); + res += lua_iolibopen(l); + res += lua_strlibopen(l); + res += lua_mathlibopen(l); + res += lua_dblibopen(l); + /* add your libraries here */ + return res; }