aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-12-29 10:30:16 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-12-29 10:30:16 -0200
commit30eebb2d1cc2cdd14426b9e80a9e1c576b955f6b (patch)
treedd58848eb26cce18ed61bd929e708c12be86ff82
parent0fd64669579f33b03dcda6fac4be908b4cfd7e15 (diff)
downloadlua-30eebb2d1cc2cdd14426b9e80a9e1c576b955f6b.tar.gz
lua-30eebb2d1cc2cdd14426b9e80a9e1c576b955f6b.tar.bz2
lua-30eebb2d1cc2cdd14426b9e80a9e1c576b955f6b.zip
detail (stop collector while openning libraries)
-rw-r--r--lua.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lua.c b/lua.c
index d795ece7..1977a793 100644
--- a/lua.c
+++ b/lua.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lua.c,v 1.154 2005/10/24 17:38:47 roberto Exp roberto $ 2** $Id: lua.c,v 1.155 2005/11/28 14:44:48 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*/
@@ -329,7 +329,9 @@ static int pmain (lua_State *L) {
329 int has_i = 0, has_v = 0, has_e = 0; 329 int has_i = 0, has_v = 0, has_e = 0;
330 globalL = L; 330 globalL = L;
331 if (argv[0] && argv[0][0]) progname = argv[0]; 331 if (argv[0] && argv[0][0]) progname = argv[0];
332 lua_gc(L, LUA_GCSTOP, 0); /* stop collector during initialization */
332 luaL_openlibs(L); /* open libraries */ 333 luaL_openlibs(L); /* open libraries */
334 lua_gc(L, LUA_GCRESTART, 0);
333 s->status = handle_luainit(L); 335 s->status = handle_luainit(L);
334 if (s->status != 0) return 0; 336 if (s->status != 0) return 0;
335 script = collectargs(argv, &has_i, &has_v, &has_e); 337 script = collectargs(argv, &has_i, &has_v, &has_e);