ThirtyTwoBitRegister has no =/hash
John M McIntosh
johnmci at smalltalkconsulting.com
Fri May 30 23:52:38 UTC 2003
I've been working on this serial port support and been using the
ThirtyTwoBitRegister class to manage
the bits that need to be poked and peeked out of memory. However today
I discovered that
| a b |
a _ ThirtyTwoBitRegister new load: 16rFCFCFCFC.
b _ a copy. "sorry can't resist making a copy"
a = b
a = b -> false
now I know that register 'a' is not the same as register 'b'
but really I'm more interested if the contents of register 'a' is equal
to the contents of register 'b'
thus I'm going to add a '=' and a hash to ThirtyTwoBitRegister class to
enable this.
I was using this class to mange longs that come out of a c structure
and was leary of using SmallInteger and
LargePositiveIntegers to do this, besides the printstring gives hex
output which is useful when bit twiddling
Other thoughts are welcome.
PS The only other place this class is used is in the Digital Signatures
logic (SecureHashAlgorithm).
--
========================================================================
===
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com
========================================================================
===
More information about the Squeak-dev
mailing list
|