aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/index.html2
-rw-r--r--src/deep.h13
-rw-r--r--src/lanes.c4
-rw-r--r--src/tools.h8
4 files changed, 13 insertions, 14 deletions
diff --git a/docs/index.html b/docs/index.html
index 49c5ef8..ff4b7a0 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -1520,7 +1520,7 @@ events to a common Linda, but... :).</font>
1520<ol> 1520<ol>
1521 <li> 1521 <li>
1522 Provide an <i>identity function</i> for your userdata, in C. This function is used for creation and deletion of your deep userdata (the shared resource), and for making metatables for the state-specific proxies for accessing it. The prototype is 1522 Provide an <i>identity function</i> for your userdata, in C. This function is used for creation and deletion of your deep userdata (the shared resource), and for making metatables for the state-specific proxies for accessing it. The prototype is
1523 <table border="1" bgcolor="#E0E0FF" cellpadding="10" style="width:50%"><tr><td><pre> void* idfunc( lua_State* L, enum eDeepOp op_);</pre></td></tr></table> 1523 <table border="1" bgcolor="#E0E0FF" cellpadding="10" style="width:50%"><tr><td><pre> void* idfunc( lua_State* L, DeepOp op_);</pre></td></tr></table>
1524 <tt>op_</tt> can be one of: 1524 <tt>op_</tt> can be one of:
1525 <ul> 1525 <ul>
1526 <li><tt>eDO_new</tt>: requests the creation of a new object, whose pointer is returned.</li> 1526 <li><tt>eDO_new</tt>: requests the creation of a new object, whose pointer is returned.</li>
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 @@
12// forwards 12// forwards
13struct s_Universe; 13struct s_Universe;
14typedef struct s_Universe Universe; 14typedef struct s_Universe Universe;
15enum eLookupMode;
16typedef 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
24enum 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};
30typedef enum eLookupMode LookupMode;
31
26enum eDeepOp 32enum 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};
39typedef enum eDeepOp DeepOp;
33 40
34typedef void* (*luaG_IdFunction)( lua_State* L, enum eDeepOp op_); 41typedef 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
433static void* linda_id( lua_State*, enum eDeepOp); 433static void* linda_id( lua_State*, DeepOp);
434 434
435static inline struct s_Linda* lua_toLinda( lua_State* L, int idx_) 435static 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*/
1129static void* linda_id( lua_State* L, enum eDeepOp op_) 1129static 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
28enum 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};
34typedef enum eLookupMode LookupMode;
35
36int luaG_inter_copy_package( Universe* U, lua_State* L, lua_State* L2, int package_idx_, LookupMode mode_); 28int luaG_inter_copy_package( Universe* U, lua_State* L, lua_State* L2, int package_idx_, LookupMode mode_);
37 29
38int luaG_inter_copy( Universe* U, lua_State* L, lua_State* L2, uint_t n, LookupMode mode_); 30int luaG_inter_copy( Universe* U, lua_State* L, lua_State* L2, uint_t n, LookupMode mode_);