diff options
Diffstat (limited to 'src/state.cpp')
-rw-r--r-- | src/state.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/state.cpp b/src/state.cpp index 7309e50..56ac74b 100644 --- a/src/state.cpp +++ b/src/state.cpp | |||
@@ -339,7 +339,7 @@ lua_State* luaG_newstate(Universe* U_, SourceState from_, char const* libs_) | |||
339 | } | 339 | } |
340 | 340 | ||
341 | DEBUGSPEW_CODE(fprintf(stderr, INDENT_BEGIN "luaG_newstate()\n" INDENT_END(U_))); | 341 | DEBUGSPEW_CODE(fprintf(stderr, INDENT_BEGIN "luaG_newstate()\n" INDENT_END(U_))); |
342 | DEBUGSPEW_CODE(DebugSpewIndentScope scope{ U_ }); | 342 | DEBUGSPEW_CODE(DebugSpewIndentScope _scope{ U_ }); |
343 | 343 | ||
344 | // copy settings (for example because it may contain a Lua on_state_create function) | 344 | // copy settings (for example because it may contain a Lua on_state_create function) |
345 | copy_one_time_settings(U_, from_, _L); | 345 | copy_one_time_settings(U_, from_, _L); |
@@ -361,7 +361,7 @@ lua_State* luaG_newstate(Universe* U_, SourceState from_, char const* libs_) | |||
361 | DEBUGSPEW_CODE(fprintf(stderr, INDENT_BEGIN "opening base library\n" INDENT_END(U_))); | 361 | DEBUGSPEW_CODE(fprintf(stderr, INDENT_BEGIN "opening base library\n" INDENT_END(U_))); |
362 | #if LUA_VERSION_NUM >= 502 | 362 | #if LUA_VERSION_NUM >= 502 |
363 | // open base library the same way as in luaL_openlibs() | 363 | // open base library the same way as in luaL_openlibs() |
364 | luaL_requiref(_L, "_G", luaopen_base, 1); | 364 | luaL_requiref(_L, LUA_GNAME, luaopen_base, 1); |
365 | lua_pop(_L, 1); | 365 | lua_pop(_L, 1); |
366 | #else // LUA_VERSION_NUM | 366 | #else // LUA_VERSION_NUM |
367 | lua_pushcfunction(_L, luaopen_base); | 367 | lua_pushcfunction(_L, luaopen_base); |