Skip to content

v2.17.0

Compare
Choose a tag to compare
@zombiezen zombiezen released this 03 Nov 18:05
· 1199 commits to main since this release
  • Add capnp.Canonicalize function that implements the canonicalization algorithm. (#92)
  • Zero-sized struct pointers are now written with an offset of -1 to distinguish them from a null pointer. (#92)
  • Better support for alternate Arena implementations
  • Arena allocation optimizations: both SingleSegment and MultiSegment now gradually ramp up the amount of space allocated in a single allocation as the message grows. This is similar to how built-in Go append function works. Workloads with medium to large messages should expect a decrease in number of allocations, while small message workloads should remain about the same. Please file an issue if you encounter any performance regressions. (#96)
  • Fix double-far pointer logic. (#97) This is a long-standing bug with reading and writing multi-segment messages. I've added broader test coverage for multi-segment messages and far pointers, so it's unlikely that such a failure will persist in the future.
  • Accessing a field in a union when that field is not the one set now results in a panic. (#56) This is intended to help uncover programming mistakes where a union field is accessed without checking Which(). Prior to this change, unset union field accessors would silently return garbage.
  • Struct.Address() and List.Address() are now deprecated. Especially for List, where the address is at the beginning of the data, not the composite literal, the return value is not well-defined and its not clear how to use it. Use capnp.SamePtr if you need to check for pointer reference equality. File an issue if you're using Address() for something else.