aboutsummaryrefslogtreecommitdiff
path: root/src/keeper.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/keeper.h')
-rw-r--r--src/keeper.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/keeper.h b/src/keeper.h
index 6688fe0..3740fc5 100644
--- a/src/keeper.h
+++ b/src/keeper.h
@@ -39,24 +39,24 @@ struct Keepers
39// xxh64 of string "kNilSentinel" generated at https://www.pelock.com/products/hash-calculator 39// xxh64 of string "kNilSentinel" generated at https://www.pelock.com/products/hash-calculator
40static constexpr UniqueKey kNilSentinel{ 0xC457D4EDDB05B5E4ull, "lanes.null" }; 40static constexpr UniqueKey kNilSentinel{ 0xC457D4EDDB05B5E4ull, "lanes.null" };
41 41
42void init_keepers(Universe* U, lua_State* L); 42void init_keepers(Universe* U, lua_State* L_);
43void close_keepers(Universe* U); 43void close_keepers(Universe* U);
44 44
45void keeper_toggle_nil_sentinels(lua_State* L, int val_i_, LookupMode const mode_); 45void keeper_toggle_nil_sentinels(lua_State* L_, int val_i_, LookupMode const mode_);
46[[nodiscard]] int keeper_push_linda_storage(Linda& linda_, DestState L); 46[[nodiscard]] int keeper_push_linda_storage(Linda& linda_, DestState L);
47 47
48using keeper_api_t = lua_CFunction; 48using keeper_api_t = lua_CFunction;
49#define KEEPER_API(_op) keepercall_##_op 49#define KEEPER_API(_op) keepercall_##_op
50#define PUSH_KEEPER_FUNC lua_pushcfunction 50#define PUSH_KEEPER_FUNC lua_pushcfunction
51// lua_Cfunctions to run inside a keeper state 51// lua_Cfunctions to run inside a keeper state
52[[nodiscard]] int keepercall_clear(lua_State* L); 52[[nodiscard]] int keepercall_clear(lua_State* L_);
53[[nodiscard]] int keepercall_send(lua_State* L); 53[[nodiscard]] int keepercall_send(lua_State* L_);
54[[nodiscard]] int keepercall_receive(lua_State* L); 54[[nodiscard]] int keepercall_receive(lua_State* L_);
55[[nodiscard]] int keepercall_receive_batched(lua_State* L); 55[[nodiscard]] int keepercall_receive_batched(lua_State* L_);
56[[nodiscard]] int keepercall_limit(lua_State* L); 56[[nodiscard]] int keepercall_limit(lua_State* L_);
57[[nodiscard]] int keepercall_get(lua_State* L); 57[[nodiscard]] int keepercall_get(lua_State* L_);
58[[nodiscard]] int keepercall_set(lua_State* L); 58[[nodiscard]] int keepercall_set(lua_State* L_);
59[[nodiscard]] int keepercall_count(lua_State* L); 59[[nodiscard]] int keepercall_count(lua_State* L_);
60 60
61using KeeperCallResult = Unique<std::optional<int>>; 61using KeeperCallResult = Unique<std::optional<int>>;
62[[nodiscard]] KeeperCallResult keeper_call(Universe* U, KeeperState K, keeper_api_t _func, lua_State* L, void* linda, int starting_index); 62[[nodiscard]] KeeperCallResult keeper_call(Universe* U, KeeperState K, keeper_api_t _func, lua_State* L_, void* linda, int starting_index);