[m-rev.] Small, but important, bugfix to bitmap.m
Ralph Becket
rbeck at microsoft.com
Thu May 10 00:42:34 AEST 2001
I'm embarrassed that I missed this one in testing...
Estimated hours taken: 0.2
library/bitmap.m:
Fixed a bug in the clear/2 function: it was clearing everything
*but* the required bit in the word holding the bit in question.
Index: bitmap.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/bitmap.m,v
retrieving revision 1.3
diff -u -r1.3 bitmap.m
--- bitmap.m 2001/02/12 06:23:26 1.3
+++ bitmap.m 2001/05/09 14:40:12
@@ -231,7 +231,7 @@
clear(BM, I) =
( if in_range(BM, I)
- then BM ^ elem(int_offset(I)) := BM ^ elem(int_offset(I)) /\
bitmask(I)
+ then BM ^ elem(int_offset(I)) := BM ^ elem(int_offset(I)) /\
\bitmask(I)
else throw("bitmap__clear: out of range")
).
@@ -247,7 +247,7 @@
BM ^ elem(int_offset(I)) := BM ^ elem(int_offset(I)) \/ bitmask(I).
unsafe_clear(BM, I) =
- BM ^ elem(int_offset(I)) := BM ^ elem(int_offset(I)) /\ bitmask(I).
+ BM ^ elem(int_offset(I)) := BM ^ elem(int_offset(I)) /\
\bitmask(I).
unsafe_flip(BM, I) =
BM ^ elem(int_offset(I)) := BM ^ elem(int_offset(I)) `xor`
bitmask(I).
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list