diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-08-07 17:54:17 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-08-07 17:54:17 -0300 |
| commit | 3bb5079dd485a5abeb79b4597636b6e5a167dc58 (patch) | |
| tree | 45abb1b60ddf4e3241c39dd85ad638167b385bdc | |
| parent | 5016f43aa439662ca35a5d78e820c617c517f60a (diff) | |
| download | lua-3bb5079dd485a5abeb79b4597636b6e5a167dc58.tar.gz lua-3bb5079dd485a5abeb79b4597636b6e5a167dc58.tar.bz2 lua-3bb5079dd485a5abeb79b4597636b6e5a167dc58.zip | |
ensure fixed order for library initialization
| -rw-r--r-- | lua.c | 19 |
1 files changed, 10 insertions, 9 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lua.c,v 1.98 2002/08/06 15:32:22 roberto Exp roberto $ | 2 | ** $Id: lua.c,v 1.99 2002/08/06 18:01:50 roberto Exp roberto $ |
| 3 | ** Lua stand-alone interpreter | 3 | ** Lua stand-alone interpreter |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -337,14 +337,15 @@ static int handle_argv (char *argv[], int *interactive) { | |||
| 337 | 337 | ||
| 338 | 338 | ||
| 339 | static int openstdlibs (lua_State *l) { | 339 | static int openstdlibs (lua_State *l) { |
| 340 | return lua_baselibopen(l) + | 340 | int res = 0; |
| 341 | lua_tablibopen(l) + | 341 | res += lua_baselibopen(l); |
| 342 | lua_iolibopen(l) + | 342 | res += lua_tablibopen(l); |
| 343 | lua_strlibopen(l) + | 343 | res += lua_iolibopen(l); |
| 344 | lua_mathlibopen(l) + | 344 | res += lua_strlibopen(l); |
| 345 | lua_dblibopen(l) + | 345 | res += lua_mathlibopen(l); |
| 346 | /* add your libraries here */ | 346 | res += lua_dblibopen(l); |
| 347 | 0; | 347 | /* add your libraries here */ |
| 348 | return res; | ||
| 348 | } | 349 | } |
| 349 | 350 | ||
| 350 | 351 | ||
