mirror of
https://github.com/protocolbuffers/protobuf
synced 2026-08-26 02:23:14 -04:00
`UntypedMapIterator::next_unchecked` currently expects to be passed a pointer to a C++ function that it can use to dereference an iterator. However, this is awkward because it's not natural for this C++ function to have the same signature for every map type. Maps with a message as value need a `MapNodeSizeInfo`, but other map types do not. We are working around this by sometimes passing an ignored placeholder constant, but this is messy. This CL replaces the `extern "C"` functions with closures. This way, we can capture the `MapNodeSizeInfo` in the closure in cases where we need it, but otherwise we no longer need to pass around placeholder values. (Note: `MapNodeSizeInfo` is going away soon, but this is still relevant because it will likely need to be replaced by a message default instance pointer.) PiperOrigin-RevId: 676438640 |
||
|---|---|---|
| .. | ||
| BUILD | ||
| compare.cc | ||
| compare.h | ||
| debug.cc | ||
| debug.h | ||
| map.cc | ||
| map.h | ||
| message.cc | ||
| repeated.cc | ||
| rust_alloc_for_cpp_api.h | ||
| rust_alloc_for_cpp_api.rs | ||
| serialized_data.h | ||
| strings.cc | ||
| strings.h | ||