diff options
Diffstat (limited to 'src/lanes.cpp')
-rw-r--r-- | src/lanes.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/lanes.cpp b/src/lanes.cpp index 22391d5..c91256e 100644 --- a/src/lanes.cpp +++ b/src/lanes.cpp | |||
@@ -553,7 +553,7 @@ LUAG_FUNC(wakeup_conv) | |||
553 | 553 | ||
554 | STACK_CHECK_START_REL(L_, 0); | 554 | STACK_CHECK_START_REL(L_, 0); |
555 | auto _readInteger = [L = L_](char const* name_) { | 555 | auto _readInteger = [L = L_](char const* name_) { |
556 | lua_getfield(L, 1, name_); | 556 | std::ignore = luaG_getfield(L, 1, name_); |
557 | lua_Integer const val{ lua_tointeger(L, -1) }; | 557 | lua_Integer const val{ lua_tointeger(L, -1) }; |
558 | lua_pop(L, 1); | 558 | lua_pop(L, 1); |
559 | return static_cast<int>(val); | 559 | return static_cast<int>(val); |
@@ -569,8 +569,7 @@ LUAG_FUNC(wakeup_conv) | |||
569 | // If Lua table has '.isdst' we trust that. If it does not, we'll let | 569 | // If Lua table has '.isdst' we trust that. If it does not, we'll let |
570 | // 'mktime' decide on whether the time is within DST or not (value -1). | 570 | // 'mktime' decide on whether the time is within DST or not (value -1). |
571 | // | 571 | // |
572 | lua_getfield(L_, 1, "isdst"); | 572 | int const _isdst{ (luaG_getfield(L_, 1, "isdst") == LuaType::BOOLEAN) ? lua_toboolean(L_, -1) : -1 }; |
573 | int const _isdst{ lua_isboolean(L_, -1) ? lua_toboolean(L_, -1) : -1 }; | ||
574 | lua_pop(L_, 1); | 573 | lua_pop(L_, 1); |
575 | STACK_CHECK(L_, 0); | 574 | STACK_CHECK(L_, 0); |
576 | 575 | ||
@@ -641,20 +640,20 @@ LUAG_FUNC(configure) | |||
641 | _U = universe_create(L_); // L_: settings universe | 640 | _U = universe_create(L_); // L_: settings universe |
642 | DEBUGSPEW_CODE(DebugSpewIndentScope _scope2{ _U }); | 641 | DEBUGSPEW_CODE(DebugSpewIndentScope _scope2{ _U }); |
643 | lua_createtable(L_, 0, 1); // L_: settings universe {mt} | 642 | lua_createtable(L_, 0, 1); // L_: settings universe {mt} |
644 | lua_getfield(L_, 1, "shutdown_timeout"); // L_: settings universe {mt} shutdown_timeout | 643 | std::ignore = luaG_getfield(L_, 1, "shutdown_timeout"); // L_: settings universe {mt} shutdown_timeout |
645 | lua_getfield(L_, 1, "shutdown_mode"); // L_: settings universe {mt} shutdown_timeout shutdown_mode | 644 | std::ignore = luaG_getfield(L_, 1, "shutdown_mode"); // L_: settings universe {mt} shutdown_timeout shutdown_mode |
646 | lua_pushcclosure(L_, universe_gc, 2); // L_: settings universe {mt} universe_gc | 645 | lua_pushcclosure(L_, universe_gc, 2); // L_: settings universe {mt} universe_gc |
647 | lua_setfield(L_, -2, "__gc"); // L_: settings universe {mt} | 646 | lua_setfield(L_, -2, "__gc"); // L_: settings universe {mt} |
648 | lua_setmetatable(L_, -2); // L_: settings universe | 647 | lua_setmetatable(L_, -2); // L_: settings universe |
649 | lua_pop(L_, 1); // L_: settings | 648 | lua_pop(L_, 1); // L_: settings |
650 | lua_getfield(L_, 1, "verbose_errors"); // L_: settings verbose_errors | 649 | std::ignore = luaG_getfield(L_, 1, "verbose_errors"); // L_: settings verbose_errors |
651 | _U->verboseErrors = lua_toboolean(L_, -1) ? true : false; | 650 | _U->verboseErrors = lua_toboolean(L_, -1) ? true : false; |
652 | lua_pop(L_, 1); // L_: settings | 651 | lua_pop(L_, 1); // L_: settings |
653 | lua_getfield(L_, 1, "demote_full_userdata"); // L_: settings demote_full_userdata | 652 | std::ignore = luaG_getfield(L_, 1, "demote_full_userdata"); // L_: settings demote_full_userdata |
654 | _U->demoteFullUserdata = lua_toboolean(L_, -1) ? true : false; | 653 | _U->demoteFullUserdata = lua_toboolean(L_, -1) ? true : false; |
655 | lua_pop(L_, 1); // L_: settings | 654 | lua_pop(L_, 1); // L_: settings |
656 | #if HAVE_LANE_TRACKING() | 655 | #if HAVE_LANE_TRACKING() |
657 | lua_getfield(L_, 1, "track_lanes"); // L_: settings track_lanes | 656 | std::ignore = luaG_getfield(L_, 1, "track_lanes"); // L_: settings track_lanes |
658 | if (lua_toboolean(L_, -1)) { | 657 | if (lua_toboolean(L_, -1)) { |
659 | _U->tracker.activate(); | 658 | _U->tracker.activate(); |
660 | } | 659 | } |