diff options
Diffstat (limited to 'src/linda.c')
-rw-r--r-- | src/linda.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/linda.c b/src/linda.c index d92f5f2..3e189f2 100644 --- a/src/linda.c +++ b/src/linda.c | |||
@@ -52,11 +52,11 @@ struct s_Linda | |||
52 | SIGNAL_T read_happened; | 52 | SIGNAL_T read_happened; |
53 | SIGNAL_T write_happened; | 53 | SIGNAL_T write_happened; |
54 | Universe* U; // the universe this linda belongs to | 54 | Universe* U; // the universe this linda belongs to |
55 | uintptr_t group; // a group to control keeper allocation between lindas | 55 | uint_t group; // a group to control keeper allocation between lindas |
56 | enum e_cancel_request simulate_cancel; | 56 | enum e_cancel_request simulate_cancel; |
57 | char name[1]; | 57 | char name[1]; |
58 | }; | 58 | }; |
59 | #define LINDA_KEEPER_HASHSEED( linda) (linda->group ? linda->group : (uintptr_t)linda) | 59 | #define LINDA_KEEPER_HASHSEED(linda) (linda->group ? linda->group : (uint_t)(ptrdiff_t) linda) |
60 | 60 | ||
61 | static void* linda_id( lua_State*, DeepOp); | 61 | static void* linda_id( lua_State*, DeepOp); |
62 | 62 | ||
@@ -766,7 +766,7 @@ static void* linda_id( lua_State* L, DeepOp op_) | |||
766 | struct s_Linda* s; | 766 | struct s_Linda* s; |
767 | size_t name_len = 0; | 767 | size_t name_len = 0; |
768 | char const* linda_name = NULL; | 768 | char const* linda_name = NULL; |
769 | unsigned long linda_group = 0; | 769 | uint_t linda_group = 0; |
770 | // should have a string and/or a number of the stack as parameters (name and group) | 770 | // should have a string and/or a number of the stack as parameters (name and group) |
771 | switch( lua_gettop( L)) | 771 | switch( lua_gettop( L)) |
772 | { | 772 | { |
@@ -780,13 +780,13 @@ static void* linda_id( lua_State* L, DeepOp op_) | |||
780 | } | 780 | } |
781 | else | 781 | else |
782 | { | 782 | { |
783 | linda_group = (unsigned long) lua_tointeger( L, -1); | 783 | linda_group = (uint_t) lua_tointeger(L, -1); |
784 | } | 784 | } |
785 | break; | 785 | break; |
786 | 786 | ||
787 | case 2: // 2 parameters, a name and group, in that order | 787 | case 2: // 2 parameters, a name and group, in that order |
788 | linda_name = lua_tolstring( L, -2, &name_len); | 788 | linda_name = lua_tolstring( L, -2, &name_len); |
789 | linda_group = (unsigned long) lua_tointeger( L, -1); | 789 | linda_group = (uint_t) lua_tointeger(L, -1); |
790 | break; | 790 | break; |
791 | } | 791 | } |
792 | 792 | ||