aboutsummaryrefslogtreecommitdiff
path: root/src/universe.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/universe.h')
-rw-r--r--src/universe.h15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/universe.h b/src/universe.h
index 3f61945..34cef33 100644
--- a/src/universe.h
+++ b/src/universe.h
@@ -13,10 +13,8 @@ extern "C" {
13 13
14// forwards 14// forwards
15struct DeepPrelude; 15struct DeepPrelude;
16struct s_Keepers; 16struct Keepers;
17typedef struct s_Keepers Keepers; 17struct Lane;
18struct s_Lane;
19typedef struct s_Lane Lane;
20 18
21// ################################################################################################ 19// ################################################################################################
22 20
@@ -28,27 +26,25 @@ typedef struct s_Lane Lane;
28// ################################################################################################ 26// ################################################################################################
29 27
30// everything we need to provide to lua_newstate() 28// everything we need to provide to lua_newstate()
31struct AllocatorDefinition_s 29struct AllocatorDefinition
32{ 30{
33 lua_Alloc allocF; 31 lua_Alloc allocF;
34 void* allocUD; 32 void* allocUD;
35}; 33};
36typedef struct AllocatorDefinition_s AllocatorDefinition;
37 34
38// mutex-protected allocator for use with Lua states that share a non-threadsafe allocator 35// mutex-protected allocator for use with Lua states that share a non-threadsafe allocator
39struct ProtectedAllocator_s 36struct ProtectedAllocator
40{ 37{
41 AllocatorDefinition definition; 38 AllocatorDefinition definition;
42 MUTEX_T lock; 39 MUTEX_T lock;
43}; 40};
44typedef struct ProtectedAllocator_s ProtectedAllocator;
45 41
46// ################################################################################################ 42// ################################################################################################
47 43
48// everything regarding the Lanes universe is stored in that global structure 44// everything regarding the Lanes universe is stored in that global structure
49// held as a full userdata in the master Lua state that required it for the first time 45// held as a full userdata in the master Lua state that required it for the first time
50// don't forget to initialize all members in LG_configure() 46// don't forget to initialize all members in LG_configure()
51struct s_Universe 47struct Universe
52{ 48{
53 // for verbose errors 49 // for verbose errors
54 bool verboseErrors; 50 bool verboseErrors;
@@ -98,7 +94,6 @@ struct s_Universe
98 // The terminal desinit sequence should wait for all such processing to terminate before force-killing threads 94 // The terminal desinit sequence should wait for all such processing to terminate before force-killing threads
99 int volatile selfdestructing_count; 95 int volatile selfdestructing_count;
100}; 96};
101typedef struct s_Universe Universe;
102 97
103Universe* universe_get( lua_State* L); 98Universe* universe_get( lua_State* L);
104Universe* universe_create( lua_State* L); 99Universe* universe_create( lua_State* L);