aboutsummaryrefslogtreecommitdiff
path: root/src/tools.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools.h')
-rw-r--r--src/tools.h33
1 files changed, 19 insertions, 14 deletions
diff --git a/src/tools.h b/src/tools.h
index c1a8534..dce7378 100644
--- a/src/tools.h
+++ b/src/tools.h
@@ -1,23 +1,21 @@
1#pragma once 1#pragma once
2 2
3#include "threading.h"
4#include "deep.h" 3#include "deep.h"
5
6#include "macros_and_utils.h" 4#include "macros_and_utils.h"
7 5
8// forwards 6// forwards
9struct Universe; 7class Universe;
10 8
11// ################################################################################################ 9// ################################################################################################
12 10
13#ifdef _DEBUG 11#ifdef _DEBUG
14void luaG_dump( lua_State* L); 12void luaG_dump(lua_State* L);
15#endif // _DEBUG 13#endif // _DEBUG
16 14
17// ################################################################################################ 15// ################################################################################################
18 16
19void push_registry_subtable_mode( lua_State* L, UniqueKey key_, const char* mode_); 17void push_registry_subtable_mode(lua_State* L, UniqueKey key_, const char* mode_);
20void push_registry_subtable( lua_State* L, UniqueKey key_); 18void push_registry_subtable(lua_State* L, UniqueKey key_);
21 19
22enum class VT 20enum class VT
23{ 21{
@@ -25,19 +23,26 @@ enum class VT
25 KEY, 23 KEY,
26 METATABLE 24 METATABLE
27}; 25};
28bool inter_copy_one(Universe* U, lua_State* L2, int L2_cache_i, lua_State* L, int i, VT vt_, LookupMode mode_, char const* upName_);
29 26
30// ################################################################################################ 27enum class InterCopyResult
28{
29 Success,
30 NotEnoughValues,
31 Error
32};
33
34[[nodiscard]] bool inter_copy_one(Universe* U, Dest L2, int L2_cache_i, Source L, int i, VT vt_, LookupMode mode_, char const* upName_);
31 35
32int luaG_inter_copy_package( Universe* U, lua_State* L, lua_State* L2, int package_idx_, LookupMode mode_); 36// ################################################################################################
33 37
34int luaG_inter_copy(Universe* U, lua_State* L, lua_State* L2, int n, LookupMode mode_); 38[[nodiscard]] InterCopyResult luaG_inter_copy_package(Universe* U, Source L, Dest L2, int package_idx_, LookupMode mode_);
35int luaG_inter_move(Universe* U, lua_State* L, lua_State* L2, int n, LookupMode mode_); 39[[nodiscard]] InterCopyResult luaG_inter_copy(Universe* U, Source L, Dest L2, int n, LookupMode mode_);
40[[nodiscard]] InterCopyResult luaG_inter_move(Universe* U, Source L, Dest L2, int n, LookupMode mode_);
36 41
37int luaG_nameof( lua_State* L); 42[[nodiscard]] int luaG_nameof(lua_State* L);
38 43
39void populate_func_lookup_table( lua_State* L, int _i, char const* _name); 44void populate_func_lookup_table(lua_State* L, int _i, char const* _name);
40void initialize_allocator_function( Universe* U, lua_State* L); 45void initialize_allocator_function(Universe* U, lua_State* L);
41 46
42// ################################################################################################ 47// ################################################################################################
43 48