MerkleSet
MerkleSet copied to clipboard
20170512 c friendly
Some trivial changes:
- Ensure that the code only does id() on objects that are allocated, confirming that all other slice copies are temporary, and that no address is used in tree construction that isn't the result of an allocation.
- Rename _ref and _deref to _deref and _addrof to make more sense in context. _ref would make sense if this was an operation with a ref counting side effect, but here it's used to retrieve the object pointed to by a pointer. _deref here retrieves a pointer to an allocated object.
- Rename flip_* to set_* for clarity.
What do you think about this?
I did a big update today which got rid of all the flip_* stuff. Not sure about the id() validation stuff, I think a lot of that is covered by the tests. Not sure about the _ref names and don't want to mess with them at the moment