aboutsummaryrefslogtreecommitdiff
path: root/src/linda.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/linda.cpp')
-rw-r--r--src/linda.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/linda.cpp b/src/linda.cpp
index ff3d543..a6025ce 100644
--- a/src/linda.cpp
+++ b/src/linda.cpp
@@ -88,7 +88,7 @@ LUAG_FUNC( linda_protected_call)
88 88
89 // acquire the keeper 89 // acquire the keeper
90 Keeper* K = keeper_acquire( linda->U->keepers, LINDA_KEEPER_HASHSEED(linda)); 90 Keeper* K = keeper_acquire( linda->U->keepers, LINDA_KEEPER_HASHSEED(linda));
91 lua_State* KL = K ? K->L : nullptr; // need to do this for 'STACK_CHECK' 91 lua_State* KL = K ? K->L : nullptr;
92 if( KL == nullptr) return 0; 92 if( KL == nullptr) return 0;
93 93
94 // retrieve the actual function to be called and move it before the arguments 94 // retrieve the actual function to be called and move it before the arguments
@@ -168,10 +168,10 @@ LUAG_FUNC( linda_send)
168 168
169 { 169 {
170 Lane* const s = get_lane_from_registry( L); 170 Lane* const s = get_lane_from_registry( L);
171 Keeper* K = which_keeper( linda->U->keepers, LINDA_KEEPER_HASHSEED( linda)); 171 Keeper* const K = which_keeper( linda->U->keepers, LINDA_KEEPER_HASHSEED( linda));
172 lua_State* KL = K ? K->L : nullptr; // need to do this for 'STACK_CHECK' 172 lua_State* KL = K ? K->L : nullptr;
173 if( KL == nullptr) return 0; 173 if( KL == nullptr) return 0;
174 STACK_CHECK( KL, 0); 174 STACK_CHECK_START_REL(KL, 0);
175 for(bool try_again{ true };;) 175 for(bool try_again{ true };;)
176 { 176 {
177 if( s != nullptr) 177 if( s != nullptr)
@@ -186,7 +186,7 @@ LUAG_FUNC( linda_send)
186 break; 186 break;
187 } 187 }
188 188
189 STACK_MID( KL, 0); 189 STACK_CHECK( KL, 0);
190 pushed = keeper_call( linda->U, KL, KEEPER_API( send), L, linda, key_i); 190 pushed = keeper_call( linda->U, KL, KEEPER_API( send), L, linda, key_i);
191 if( pushed < 0) 191 if( pushed < 0)
192 { 192 {
@@ -231,7 +231,7 @@ LUAG_FUNC( linda_send)
231 } 231 }
232 } 232 }
233 } 233 }
234 STACK_END( KL, 0); 234 STACK_CHECK( KL, 0);
235 } 235 }
236 236
237 if( pushed < 0) 237 if( pushed < 0)
@@ -839,7 +839,7 @@ static void* linda_id( lua_State* L, DeepOp op_)
839 case eDO_metatable: 839 case eDO_metatable:
840 { 840 {
841 841
842 STACK_CHECK( L, 0); 842 STACK_CHECK_START_REL(L, 0);
843 lua_newtable( L); 843 lua_newtable( L);
844 // metatable is its own index 844 // metatable is its own index
845 lua_pushvalue( L, -1); 845 lua_pushvalue( L, -1);
@@ -904,7 +904,7 @@ static void* linda_id( lua_State* L, DeepOp op_)
904 NIL_SENTINEL.push(L); 904 NIL_SENTINEL.push(L);
905 lua_setfield( L, -2, "null"); 905 lua_setfield( L, -2, "null");
906 906
907 STACK_END( L, 1); 907 STACK_CHECK( L, 1);
908 return nullptr; 908 return nullptr;
909 } 909 }
910 910