z_05_use_ref_count.patch 692 B

1234567891011121314
  1. --- contrib/libs/protobuf/src/google/protobuf/arenastring.cc (5de6c47c971aa5c751f17043b8ddf45bcc6daee0)
  2. +++ contrib/libs/protobuf/src/google/protobuf/arenastring.cc (c7e1b2fc457f6c68ed50780be734651758d4f548)
  3. @@ -96,9 +96,10 @@ class ScopedCheckPtrInvariants {
  4. #endif // NDEBUG || !GOOGLE_PROTOBUF_INTERNAL_DONATE_STEAL
  5. // Creates a heap allocated TProtoStringType value.
  6. -inline TaggedStringPtr CreateString(absl::string_view value) {
  7. +template <typename TArg>
  8. +inline TaggedStringPtr CreateString(const TArg& value) {
  9. TaggedStringPtr res;
  10. - res.SetAllocated(new TProtoStringType(value.data(), value.length()));
  11. + res.SetAllocated(new TProtoStringType(value));
  12. return res;
  13. }