protoc-dont-use-string-view-in-io.patch 1.6 KB

12345678910111213141516171819202122232425262728293031
  1. --- a/src/google/protobuf/compiler/importer.cc (d9b2a82a272102f9099f5bc0cb767279d3e89e3a)
  2. +++ b/src/google/protobuf/compiler/importer.cc (0dd6d02cb89a06c67e29040284d9239dfe0024b7)
  3. @@ -442,7 +442,7 @@ bool DiskSourceTree::VirtualFileToDiskFile(absl::string_view virtual_file,
  4. return stream != nullptr;
  5. }
  6. -io::ZeroCopyInputStream* DiskSourceTree::Open(absl::string_view filename) {
  7. +io::ZeroCopyInputStream* DiskSourceTree::Open(const TProtoStringType& filename) {
  8. return OpenVirtualFile(filename, nullptr);
  9. }
  10. --- a/src/google/protobuf/compiler/importer.h (d9b2a82a272102f9099f5bc0cb767279d3e89e3a)
  11. +++ b/src/google/protobuf/compiler/importer.h (0dd6d02cb89a06c67e29040284d9239dfe0024b7)
  12. @@ -245,7 +245,7 @@ class PROTOBUF_EXPORT SourceTree {
  13. // found. The caller takes ownership of the returned object. The filename
  14. // must be a path relative to the root of the source tree and must not
  15. // contain "." or ".." components.
  16. - virtual io::ZeroCopyInputStream* Open(absl::string_view filename) = 0;
  17. + virtual io::ZeroCopyInputStream* Open(const TProtoStringType& filename) = 0;
  18. // If Open() returns NULL, calling this method immediately will return an
  19. // description of the error.
  20. @@ -322,7 +322,7 @@ class PROTOBUF_EXPORT DiskSourceTree : public SourceTree {
  21. TProtoStringType* disk_file);
  22. // implements SourceTree -------------------------------------------
  23. - io::ZeroCopyInputStream* Open(absl::string_view filename) override;
  24. + io::ZeroCopyInputStream* Open(const TProtoStringType& filename) override;
  25. TProtoStringType GetLastErrorMessage() override;