1. getter function to access the upb_Map corresponding to a map proto field 2. conversion function to get a Go map from a upb_Map. The conversion function uses generics, so it must be a standalone function independent of `MessageAccessor`. Accessing map fields is not as efficient as accessing other proto field types, because of two reasons: - we need to make a copy of map values in Go, since the memory representations are different in UPB C - we need to call C functions from Go, because the upb_Map struct fields are not exported and we can't access the bits directly, causing performance overhead Luckily the map fields can be quite rare, so the performance overhead should not be too significant overall. PiperOrigin-RevId: 559191359pull/13675/head^2
parent
243add4411
commit
043ad5ce6e
1 changed files with 4 additions and 1 deletions
Loading…
Reference in new issue