On 13/04/2015 20:35, Nick Wellnhofer wrote:
The first one is CLOWNFISH-2 "Create iterator for Hash":
Then there's CLOWNFISH-7 "String-only keys for Hash":
These issues are resolved now.
Some other notes from my side:
If we only support string keys, should Obj#Hash_Sum be removed? If not, hash
sums should be of type size_t.
LFReg uses string keys now, so Obj#Hash_Sum could be removed. OTOH, we could
just keep it without making it public. I don't have a strong opinion on this.
What's the Find_Key method for? I think it can be removed.
This method only seems useful for testing. I lean towards removing it.
Using unsigned 32-bit values for hash size and capacity is OK in my opinion.
But HashIter uses int32_t for ticks. It should either use uint32_t or check
for overflow.
I forgot that I resolved this issue already.
Another thing: We should implement Clone and Shallow_Copy methods for Hash
just like the ones in VArray.
Nick