From 846322e52afdad04c92c90c8d43ecc19e46a2b9e Mon Sep 17 00:00:00 2001 From: Benoit Germain Date: Fri, 2 Nov 2018 16:00:41 +0100 Subject: Enum buildfix --- src/deep.h | 13 ++++++++++--- src/lanes.c | 4 ++-- src/tools.h | 8 -------- 3 files changed, 12 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/deep.h b/src/deep.h index aeeb828..918de6a 100644 --- a/src/deep.h +++ b/src/deep.h @@ -12,8 +12,6 @@ // forwards struct s_Universe; typedef struct s_Universe Universe; -enum eLookupMode; -typedef enum eLookupMode LookupMode; #if !defined LANES_API // when deep is compiled standalone outside Lanes #if (defined PLATFORM_WIN32) || (defined PLATFORM_POCKETPC) @@ -23,6 +21,14 @@ typedef enum eLookupMode LookupMode; #endif // (defined PLATFORM_WIN32) || (defined PLATFORM_POCKETPC) #endif // LANES_API +enum eLookupMode +{ + eLM_LaneBody, // send the lane body directly from the source to the destination lane + eLM_ToKeeper, // send a function from a lane to a keeper state + eLM_FromKeeper // send a function from a keeper state to a lane +}; +typedef enum eLookupMode LookupMode; + enum eDeepOp { eDO_new, @@ -30,8 +36,9 @@ enum eDeepOp eDO_metatable, eDO_module, }; +typedef enum eDeepOp DeepOp; -typedef void* (*luaG_IdFunction)( lua_State* L, enum eDeepOp op_); +typedef void* (*luaG_IdFunction)( lua_State* L, DeepOp op_); // ################################################################################################ 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 }; #define LINDA_KEEPER_HASHSEED( linda) (linda->group ? linda->group : (ptrdiff_t)linda) -static void* linda_id( lua_State*, enum eDeepOp); +static void* linda_id( lua_State*, DeepOp); static inline struct s_Linda* lua_toLinda( lua_State* L, int idx_) { @@ -1126,7 +1126,7 @@ LUAG_FUNC( linda_towatch) * For any other strings, the ID function must not react at all. This allows * future extensions of the system. */ -static void* linda_id( lua_State* L, enum eDeepOp op_) +static void* linda_id( lua_State* L, DeepOp op_) { switch( op_) { 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); // ################################################################################################ -enum eLookupMode -{ - eLM_LaneBody, // send the lane body directly from the source to the destination lane - eLM_ToKeeper, // send a function from a lane to a keeper state - eLM_FromKeeper // send a function from a keeper state to a lane -}; -typedef enum eLookupMode LookupMode; - int luaG_inter_copy_package( Universe* U, lua_State* L, lua_State* L2, int package_idx_, LookupMode mode_); int luaG_inter_copy( Universe* U, lua_State* L, lua_State* L2, uint_t n, LookupMode mode_); -- cgit v1.2.3-55-g6feb