mirror of
https://github.com/zap-proto/cpp.git
synced 2026-10-30 15:05:47 +00:00
The runtime could read a list of records — object(i, stride) — and a list of pointers, but not the third shape: entries laid down as a four-byte length followed by that many bytes, which is the only shape an element with no width of its own can have. The Go and Rust runtimes have read it since they had lists; here a generated accessor for it named a method that was not there. bytes_at walks the entries and object_at reads one as the message it is. The walk is what the shape costs — locating element i passes the ones before it — and it is the reason a record list carries a stride instead.