File tree Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -126,8 +126,13 @@ static bool bif_bb_put_2(query *q)
126126 dup_cells (val , tmp , tmp -> num_cells );
127127
128128 prolog_lock (q -> pl );
129- sl_del (q -> pl -> keyval , key1 );
130- sl_del (q -> pl -> keyval , key2 );
129+
130+ while (sl_del (q -> pl -> keyval , key1 ))
131+ ;
132+
133+ while (sl_del (q -> pl -> keyval , key2 ))
134+ ;
135+
131136 sl_app (q -> pl -> keyval , key2 , val );
132137 prolog_unlock (q -> pl );
133138
@@ -270,6 +275,12 @@ static bool bif_bb_delete_2(query *q)
270275 }
271276
272277 bool ok = sl_del (q -> pl -> keyval , key );
278+
279+ if (ok ) {
280+ while (sl_del (q -> pl -> keyval , key ))
281+ ;
282+ }
283+
273284 prolog_unlock (q -> pl );
274285 return ok ;
275286}
@@ -335,7 +346,10 @@ static bool bif_bb_update_3(query *q)
335346 cell * value = malloc (sizeof (cell )* tmp -> num_cells );
336347 checked (value );
337348 dup_cells (value , tmp , tmp -> num_cells );
338- sl_del (q -> pl -> keyval , key );
349+
350+ while (sl_del (q -> pl -> keyval , key ))
351+ ;
352+
339353 sl_app (q -> pl -> keyval , key , value );
340354
341355 prolog_unlock (q -> pl );
You can’t perform that action at this time.
0 commit comments