diff options
author | Benoit Germain <b n t DOT g e r m a i n AT g m a i l DOT c o m> | 2018-11-02 16:00:41 +0100 |
---|---|---|
committer | Benoit Germain <b n t DOT g e r m a i n AT g m a i l DOT c o m> | 2018-11-02 16:00:41 +0100 |
commit | 846322e52afdad04c92c90c8d43ecc19e46a2b9e (patch) | |
tree | c661a76382c3fb4f562bf7aca93a26143749c731 /src | |
parent | e21a392b9c5f22c92e56fb0e0897cb8e77d51d0f (diff) | |
download | lanes-846322e52afdad04c92c90c8d43ecc19e46a2b9e.tar.gz lanes-846322e52afdad04c92c90c8d43ecc19e46a2b9e.tar.bz2 lanes-846322e52afdad04c92c90c8d43ecc19e46a2b9e.zip |
Enum buildfix
Diffstat (limited to 'src')
-rw-r--r-- | src/deep.h | 13 | ||||
-rw-r--r-- | src/lanes.c | 4 | ||||
-rw-r--r-- | src/tools.h | 8 |
3 files changed, 12 insertions, 13 deletions
@@ -12,8 +12,6 @@ | |||
12 | // forwards | 12 | // forwards |
13 | struct s_Universe; | 13 | struct s_Universe; |
14 | typedef struct s_Universe Universe; | 14 | typedef struct s_Universe Universe; |
15 | enum eLookupMode; | ||
16 | typedef enum eLookupMode LookupMode; | ||
17 | 15 | ||
18 | #if !defined LANES_API // when deep is compiled standalone outside Lanes | 16 | #if !defined LANES_API // when deep is compiled standalone outside Lanes |
19 | #if (defined PLATFORM_WIN32) || (defined PLATFORM_POCKETPC) | 17 | #if (defined PLATFORM_WIN32) || (defined PLATFORM_POCKETPC) |
@@ -23,6 +21,14 @@ typedef enum eLookupMode LookupMode; | |||
23 | #endif // (defined PLATFORM_WIN32) || (defined PLATFORM_POCKETPC) | 21 | #endif // (defined PLATFORM_WIN32) || (defined PLATFORM_POCKETPC) |
24 | #endif // LANES_API | 22 | #endif // LANES_API |
25 | 23 | ||
24 | enum eLookupMode | ||
25 | { | ||
26 | eLM_LaneBody, // send the lane body directly from the source to the destination lane | ||
27 | eLM_ToKeeper, // send a function from a lane to a keeper state | ||
28 | eLM_FromKeeper // send a function from a keeper state to a lane | ||
29 | }; | ||
30 | typedef enum eLookupMode LookupMode; | ||
31 | |||
26 | enum eDeepOp | 32 | enum eDeepOp |
27 | { | 33 | { |
28 | eDO_new, | 34 | eDO_new, |
@@ -30,8 +36,9 @@ enum eDeepOp | |||
30 | eDO_metatable, | 36 | eDO_metatable, |
31 | eDO_module, | 37 | eDO_module, |
32 | }; | 38 | }; |
39 | typedef enum eDeepOp DeepOp; | ||
33 | 40 | ||
34 | typedef void* (*luaG_IdFunction)( lua_State* L, enum eDeepOp op_); | 41 | typedef void* (*luaG_IdFunction)( lua_State* L, DeepOp op_); |
35 | 42 | ||
36 | // ################################################################################################ | 43 | // ################################################################################################ |
37 | 44 | ||
diff --git a/src/lanes.c b/src/lanes.c index aeba5fb..b89e3f5 100644 --- a/src/lanes.c +++ b/src/lanes.c | |||
@@ -430,7 +430,7 @@ struct s_Linda | |||
430 | }; | 430 | }; |
431 | #define LINDA_KEEPER_HASHSEED( linda) (linda->group ? linda->group : (ptrdiff_t)linda) | 431 | #define LINDA_KEEPER_HASHSEED( linda) (linda->group ? linda->group : (ptrdiff_t)linda) |
432 | 432 | ||
433 | static void* linda_id( lua_State*, enum eDeepOp); | 433 | static void* linda_id( lua_State*, DeepOp); |
434 | 434 | ||
435 | static inline struct s_Linda* lua_toLinda( lua_State* L, int idx_) | 435 | static inline struct s_Linda* lua_toLinda( lua_State* L, int idx_) |
436 | { | 436 | { |
@@ -1126,7 +1126,7 @@ LUAG_FUNC( linda_towatch) | |||
1126 | * For any other strings, the ID function must not react at all. This allows | 1126 | * For any other strings, the ID function must not react at all. This allows |
1127 | * future extensions of the system. | 1127 | * future extensions of the system. |
1128 | */ | 1128 | */ |
1129 | static void* linda_id( lua_State* L, enum eDeepOp op_) | 1129 | static void* linda_id( lua_State* L, DeepOp op_) |
1130 | { | 1130 | { |
1131 | switch( op_) | 1131 | switch( op_) |
1132 | { | 1132 | { |
diff --git a/src/tools.h b/src/tools.h index df429f7..11a541c 100644 --- a/src/tools.h +++ b/src/tools.h | |||
@@ -25,14 +25,6 @@ void luaG_copy_one_time_settings( Universe* U, lua_State* L, lua_State* L2); | |||
25 | 25 | ||
26 | // ################################################################################################ | 26 | // ################################################################################################ |
27 | 27 | ||
28 | enum eLookupMode | ||
29 | { | ||
30 | eLM_LaneBody, // send the lane body directly from the source to the destination lane | ||
31 | eLM_ToKeeper, // send a function from a lane to a keeper state | ||
32 | eLM_FromKeeper // send a function from a keeper state to a lane | ||
33 | }; | ||
34 | typedef enum eLookupMode LookupMode; | ||
35 | |||
36 | int luaG_inter_copy_package( Universe* U, lua_State* L, lua_State* L2, int package_idx_, LookupMode mode_); | 28 | int luaG_inter_copy_package( Universe* U, lua_State* L, lua_State* L2, int package_idx_, LookupMode mode_); |
37 | 29 | ||
38 | int luaG_inter_copy( Universe* U, lua_State* L, lua_State* L2, uint_t n, LookupMode mode_); | 30 | int luaG_inter_copy( Universe* U, lua_State* L, lua_State* L2, uint_t n, LookupMode mode_); |