diff options
Diffstat (limited to 'src/universe.h')
-rw-r--r-- | src/universe.h | 15 |
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 |
15 | struct DeepPrelude; | 15 | struct DeepPrelude; |
16 | struct s_Keepers; | 16 | struct Keepers; |
17 | typedef struct s_Keepers Keepers; | 17 | struct Lane; |
18 | struct s_Lane; | ||
19 | typedef 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() |
31 | struct AllocatorDefinition_s | 29 | struct AllocatorDefinition |
32 | { | 30 | { |
33 | lua_Alloc allocF; | 31 | lua_Alloc allocF; |
34 | void* allocUD; | 32 | void* allocUD; |
35 | }; | 33 | }; |
36 | typedef 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 |
39 | struct ProtectedAllocator_s | 36 | struct ProtectedAllocator |
40 | { | 37 | { |
41 | AllocatorDefinition definition; | 38 | AllocatorDefinition definition; |
42 | MUTEX_T lock; | 39 | MUTEX_T lock; |
43 | }; | 40 | }; |
44 | typedef 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() |
51 | struct s_Universe | 47 | struct 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 | }; |
101 | typedef struct s_Universe Universe; | ||
102 | 97 | ||
103 | Universe* universe_get( lua_State* L); | 98 | Universe* universe_get( lua_State* L); |
104 | Universe* universe_create( lua_State* L); | 99 | Universe* universe_create( lua_State* L); |