protoc-use-tsting.patch 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. --- a/src/google/protobuf/compiler/cpp/parse_function_generator.cc (index)
  2. +++ b/src/google/protobuf/compiler/cpp/parse_function_generator.cc (working tree)
  3. @@ -44,6 +44,10 @@
  4. #include "google/protobuf/generated_message_tctable_impl.h"
  5. #include "google/protobuf/wire_format.h"
  6. +#include "util/generic/string.h"
  7. +
  8. +using TProtoStringType = TString;
  9. +
  10. namespace google {
  11. namespace protobuf {
  12. namespace compiler {
  13. @@ -894,7 +898,7 @@ void ParseFunctionGenerator::GenerateFieldNames(Formatter& format) {
  14. // Then print each name in a line of its own
  15. for (; sizes < sizes_end; p += *sizes++) {
  16. - if (*sizes != 0) format("\"$1$\"\n", TProtoStringType(p, p + *sizes));
  17. + if (*sizes != 0) format("\"$1$\"\n", TProtoStringType((const char*)p, (const char*)p + *sizes));
  18. }
  19. }
  20. --- a/src/google/protobuf/compiler/csharp/names.h (index)
  21. +++ b/src/google/protobuf/compiler/csharp/names.h (working tree)
  22. @@ -39,10 +39,13 @@
  23. #define GOOGLE_PROTOBUF_COMPILER_CSHARP_NAMES_H__
  24. #include <string>
  25. +#include "util/generic/string.h"
  26. #include "absl/strings/string_view.h"
  27. #include "google/protobuf/port_def.inc"
  28. +using TProtoStringType = TString;
  29. +
  30. namespace google {
  31. namespace protobuf {
  32. --- a/src/google/protobuf/compiler/java/options.h (index)
  33. +++ b/src/google/protobuf/compiler/java/options.h (working tree)
  34. @@ -32,9 +32,12 @@
  35. #define GOOGLE_PROTOBUF_COMPILER_JAVA_OPTIONS_H__
  36. #include <string>
  37. +#include "util/generic/string.h"
  38. #include "google/protobuf/port_def.inc"
  39. +using TProtoStringType = TString;
  40. +
  41. namespace google {
  42. namespace protobuf {
  43. namespace compiler {
  44. --- a/src/google/protobuf/compiler/objectivec/text_format_decode_data.h (index)
  45. +++ b/src/google/protobuf/compiler/objectivec/text_format_decode_data.h (working tree)
  46. @@ -35,9 +35,13 @@
  47. #include <utility>
  48. #include <vector>
  49. +#include "util/generic/string.h"
  50. +
  51. // Must be included last
  52. #include "google/protobuf/port_def.inc"
  53. +using TProtoStringType = TString;
  54. +
  55. namespace google {
  56. namespace protobuf {
  57. namespace compiler {