diff options
Diffstat (limited to 'lua.c')
-rw-r--r-- | lua.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -617,6 +617,10 @@ static void doREPL (lua_State *L) { | |||
617 | 617 | ||
618 | /* }================================================================== */ | 618 | /* }================================================================== */ |
619 | 619 | ||
620 | #if !defined(luai_openlibs) | ||
621 | #define luai_openlibs(L) luaL_openlibs(L) | ||
622 | #endif | ||
623 | |||
620 | 624 | ||
621 | /* | 625 | /* |
622 | ** Main body of stand-alone interpreter (to be called in protected mode). | 626 | ** Main body of stand-alone interpreter (to be called in protected mode). |
@@ -639,7 +643,7 @@ static int pmain (lua_State *L) { | |||
639 | lua_pushboolean(L, 1); /* signal for libraries to ignore env. vars. */ | 643 | lua_pushboolean(L, 1); /* signal for libraries to ignore env. vars. */ |
640 | lua_setfield(L, LUA_REGISTRYINDEX, "LUA_NOENV"); | 644 | lua_setfield(L, LUA_REGISTRYINDEX, "LUA_NOENV"); |
641 | } | 645 | } |
642 | luaL_openlibs(L); /* open standard libraries */ | 646 | luai_openlibs(L); /* open standard libraries */ |
643 | createargtable(L, argv, argc, script); /* create table 'arg' */ | 647 | createargtable(L, argv, argc, script); /* create table 'arg' */ |
644 | lua_gc(L, LUA_GCRESTART); /* start GC... */ | 648 | lua_gc(L, LUA_GCRESTART); /* start GC... */ |
645 | lua_gc(L, LUA_GCGEN, 0, 0); /* ...in generational mode */ | 649 | lua_gc(L, LUA_GCGEN, 0, 0); /* ...in generational mode */ |