Internal change

PiperOrigin-RevId: 681120014
pull/18574/head
Protobuf Team Bot 6 months ago committed by Copybara-Service
parent 4e26e40907
commit 77ee83b8da
  1. 10
      src/google/protobuf/descriptor.cc
  2. 13
      src/google/protobuf/late_loaded_option.proto
  3. 11
      src/google/protobuf/late_loaded_option_user.proto

@ -258,6 +258,16 @@ using IntT = int;
template <typename T>
using PointerT = T*;
// State that we gather during EstimatedMemoryUsed while on the lock, but we
// will use outside the lock.
struct EstimatedMemoryUsedState {
// We can't call SpaceUsed under the lock because it uses reflection and can
// potentially deadlock if it requires to load new files into the pool.
// NOTE: Messages added here must not be modified or destroyed outside the
// lock while the pool is alive.
std::vector<const Message*> messages;
};
// Manages an allocation of sequential arrays of type `T...`.
// It is more space efficient than storing N (ptr, size) pairs, by storing only
// the pointer to the head and the boundaries between the arrays.

@ -0,0 +1,13 @@
edition = "2023";
package protobuf_unittest;
import "google/protobuf/descriptor.proto";
message LateLoadedOption {
int32 value = 1;
extend google.protobuf.MessageOptions {
LateLoadedOption ext = 95126892;
}
}

@ -0,0 +1,11 @@
edition = "2023";
package protobuf_unittest;
import "google/protobuf/late_loaded_option.proto";
message LateLoadedOptionUser {
option (protobuf_unittest.LateLoadedOption.ext) = {
value: 1
};
}
Loading…
Cancel
Save