unanonymize-error-message.patch 822 B

1234567891011121314151617181920
  1. --- a/src/google/protobuf/message_lite.cc (index)
  2. +++ b/src/google/protobuf/message_lite.cc (working tree)
  3. @@ -98,6 +98,8 @@ void ByteSizeConsistencyError(size_t byte_size_before_serialization,
  4. ABSL_LOG(FATAL) << "This shouldn't be called if all the sizes are equal.";
  5. }
  6. +} // anonymous namespace
  7. +
  8. TProtoStringType InitializationErrorMessage(absl::string_view action,
  9. const MessageLite& message) {
  10. return absl::StrCat("Can't ", action, " message of type \"",
  11. @@ -106,6 +108,8 @@ TProtoStringType InitializationErrorMessage(absl::string_view action,
  12. message.InitializationErrorString());
  13. }
  14. +namespace {
  15. +
  16. inline absl::string_view as_string_view(const void* data, int size) {
  17. return absl::string_view(static_cast<const char*>(data), size);
  18. }