aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/_pch.hpp4
-rw-r--r--src/linda.cpp10
-rw-r--r--src/linda.hpp2
-rw-r--r--src/macros_and_utils.hpp1
4 files changed, 13 insertions, 4 deletions
diff --git a/src/_pch.hpp b/src/_pch.hpp
index 495a959..a77b7f5 100644
--- a/src/_pch.hpp
+++ b/src/_pch.hpp
@@ -1,5 +1,3 @@
1#pragma once
2
3#include <algorithm> 1#include <algorithm>
4#include <array> 2#include <array>
5#include <atomic> 3#include <atomic>
@@ -9,6 +7,7 @@
9#include <compare> 7#include <compare>
10#include <concepts> 8#include <concepts>
11#include <condition_variable> 9#include <condition_variable>
10#include <cstring>
12#include <functional> 11#include <functional>
13#include <iostream> 12#include <iostream>
14#ifndef __PROSPERO__ 13#ifndef __PROSPERO__
@@ -19,6 +18,7 @@
19#include <ranges> 18#include <ranges>
20#include <source_location> 19#include <source_location>
21//#include <stop_token> 20//#include <stop_token>
21#include <span>
22#include <string_view> 22#include <string_view>
23#include <thread> 23#include <thread>
24#include <tuple> 24#include <tuple>
diff --git a/src/linda.cpp b/src/linda.cpp
index a9ae61c..fa28385 100644
--- a/src/linda.cpp
+++ b/src/linda.cpp
@@ -1178,7 +1178,15 @@ LUAG_FUNC(linda)
1178 if (lua_isnil(L_, kIdxTop)) { 1178 if (lua_isnil(L_, kIdxTop)) {
1179 lua_pop(L_, 1); 1179 lua_pop(L_, 1);
1180 lua_pushnumber(L_, _U->lindaWakePeriod.count()); 1180 lua_pushnumber(L_, _U->lindaWakePeriod.count());
1181 } else { 1181 } else if (luaG_type(L_, kIdxTop) == LuaType::STRING) {
1182 if (luaG_tostring(L_, kIdxTop) != "never") {
1183 luaL_argerror(L_, 1, "invalid wake_period");
1184 } else {
1185 lua_pop(L_, 1);
1186 lua_pushnumber(L_, 0);
1187 }
1188 }
1189 else {
1182 luaL_argcheck(L_, luaL_optnumber(L_, 2, 0) > 0, 1, "wake_period must be > 0"); 1190 luaL_argcheck(L_, luaL_optnumber(L_, 2, 0) > 0, 1, "wake_period must be > 0");
1183 } 1191 }
1184 1192
diff --git a/src/linda.hpp b/src/linda.hpp
index 7874db3..cff30e5 100644
--- a/src/linda.hpp
+++ b/src/linda.hpp
@@ -18,7 +18,7 @@ class Linda final
18 { 18 {
19 private: 19 private:
20 Linda& linda; 20 Linda& linda;
21 [[maybe_unused]] lua_State* const L; // just here for inspection while debugging 21 lua_State* const L{}; // just here for inspection while debugging
22 22
23 public: 23 public:
24 KeeperOperationInProgress(Linda& linda_, lua_State* const L_) 24 KeeperOperationInProgress(Linda& linda_, lua_State* const L_)
diff --git a/src/macros_and_utils.hpp b/src/macros_and_utils.hpp
index 16011f7..1aca818 100644
--- a/src/macros_and_utils.hpp
+++ b/src/macros_and_utils.hpp
@@ -21,6 +21,7 @@ inline void STACK_GROW(lua_State* const L_, int const n_)
21 21
22// ################################################################################################# 22// #################################################################################################
23 23
24// 1 unit of lua_Duration lasts 1 second (using default period of std::ratio<1>)
24using lua_Duration = std::chrono::template duration<lua_Number>; 25using lua_Duration = std::chrono::template duration<lua_Number>;
25 26
26// ################################################################################################# 27// #################################################################################################