b5f92a349c
GitOrigin-RevId: 7c9cc5a6e5d38010801741ac830a3f8fd667a7a0
116 lines
4.1 KiB
Diff
116 lines
4.1 KiB
Diff
diff --git a/BUILD.bazel b/BUILD.bazel
|
|
index 637882c49..2cb08f1b0 100644
|
|
--- a/BUILD.bazel
|
|
+++ b/BUILD.bazel
|
|
@@ -165,6 +165,8 @@ alias(
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
+# Envoy: Patch
|
|
+
|
|
cc_binary(
|
|
name = "protoc",
|
|
copts = COPTS,
|
|
@@ -173,6 +175,14 @@ cc_binary(
|
|
deps = ["//src/google/protobuf/compiler:protoc_lib"],
|
|
)
|
|
|
|
+alias(
|
|
+ name = "protobuf_python_genproto",
|
|
+ actual = "//python:well_known_types_py_pb2_genproto",
|
|
+ visibility = ["//visibility:public"],
|
|
+)
|
|
+
|
|
+# /Envoy: Patch
|
|
+
|
|
cc_binary(
|
|
name = "protoc_static",
|
|
copts = COPTS,
|
|
diff --git a/python/google/protobuf/__init__.py b/python/google/protobuf/__init__.py
|
|
index 88de4cf8a..b3e046997 100755
|
|
--- a/python/google/protobuf/__init__.py
|
|
+++ b/python/google/protobuf/__init__.py
|
|
@@ -31,3 +31,10 @@
|
|
# Copyright 2007 Google Inc. All Rights Reserved.
|
|
|
|
__version__ = '4.23.1'
|
|
+
|
|
+
|
|
+if __name__ != '__main__':
|
|
+ try:
|
|
+ __import__('pkg_resources').declare_namespace(__name__)
|
|
+ except ImportError:
|
|
+ __path__ = __import__('pkgutil').extend_path(__path__, __name__)
|
|
diff --git a/src/google/protobuf/compiler/BUILD.bazel b/src/google/protobuf/compiler/BUILD.bazel
|
|
index a2171c806..8aec6187f 100644
|
|
--- a/src/google/protobuf/compiler/BUILD.bazel
|
|
+++ b/src/google/protobuf/compiler/BUILD.bazel
|
|
@@ -306,7 +306,7 @@ cc_library(
|
|
srcs = ["retention.cc"],
|
|
hdrs = ["retention.h"],
|
|
include_prefix = "google/protobuf/compiler",
|
|
- visibility = ["//src/google/protobuf:__subpackages__"],
|
|
+ visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//src/google/protobuf:protobuf_nowkt",
|
|
"@com_google_absl//absl/types:span",
|
|
diff --git a/src/google/protobuf/io/BUILD.bazel b/src/google/protobuf/io/BUILD.bazel
|
|
index 8f39625c2..2c2c73dcd 100644
|
|
--- a/src/google/protobuf/io/BUILD.bazel
|
|
+++ b/src/google/protobuf/io/BUILD.bazel
|
|
@@ -142,7 +142,7 @@ cc_library(
|
|
"@com_google_absl//absl/log:absl_log",
|
|
] + select({
|
|
"//build_defs:config_msvc": [],
|
|
- "//conditions:default": ["@zlib//:zlib"],
|
|
+ "//conditions:default": ["//external:zlib"],
|
|
}),
|
|
)
|
|
|
|
diff --git a/src/google/protobuf/map.h b/src/google/protobuf/map.h
|
|
index 869ebf100..fec92e2b1 100644
|
|
--- a/src/google/protobuf/map.h
|
|
+++ b/src/google/protobuf/map.h
|
|
@@ -883,7 +883,7 @@ class KeyMapBase : public UntypedMapBase {
|
|
TreeConvert(b);
|
|
}
|
|
ABSL_DCHECK(TableEntryIsTree(b))
|
|
- << (void*)table_[b] << " " << (uintptr_t)table_[b];
|
|
+ << reinterpret_cast<void*>(table_[b]) << " " << static_cast<uintptr_t>(table_[b]);
|
|
InsertUniqueInTree(b, node);
|
|
index_of_first_non_null_ = (std::min)(index_of_first_non_null_, b);
|
|
}
|
|
diff --git a/src/google/protobuf/map_field.h b/src/google/protobuf/map_field.h
|
|
index 70b12b1e7..b8f46db45 100644
|
|
--- a/src/google/protobuf/map_field.h
|
|
+++ b/src/google/protobuf/map_field.h
|
|
@@ -345,7 +345,7 @@ class PROTOBUF_EXPORT MapFieldBase : public MapFieldBaseForParse {
|
|
|
|
protected:
|
|
// "protected" stops users from deleting a `MapFieldBase *`
|
|
- ~MapFieldBase();
|
|
+ virtual ~MapFieldBase();
|
|
|
|
public:
|
|
// Returns reference to internal repeated field. Data written using
|
|
diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc
|
|
index 1c6a24945..6186c2ad1 100644
|
|
--- a/src/google/protobuf/port_def.inc
|
|
+++ b/src/google/protobuf/port_def.inc
|
|
@@ -1004,7 +1004,7 @@ static_assert(PROTOBUF_ABSL_MIN(20230125, 3),
|
|
#pragma clang diagnostic ignored "-Wshorten-64-to-32"
|
|
// Turn on -Wdeprecated-enum-enum-conversion. This deprecation comes in C++20
|
|
// via http://wg21.link/p1120r0.
|
|
-#pragma clang diagnostic error "-Wdeprecated-enum-enum-conversion"
|
|
+// #pragma clang diagnostic error "-Wdeprecated-enum-enum-conversion"
|
|
// This error has been generally flaky, but we need to disable it specifically
|
|
// to fix https://github.com/protocolbuffers/protobuf/issues/12313
|
|
#pragma clang diagnostic ignored "-Wunused-parameter"
|
|
@@ -1062,6 +1062,7 @@ static_assert(PROTOBUF_ABSL_MIN(20230125, 3),
|
|
#pragma warning(disable: 4125)
|
|
#endif
|
|
|
|
+#pragma GCC diagnostic ignored "-Wundef"
|
|
#if PROTOBUF_ENABLE_DEBUG_LOGGING_MAY_LEAK_PII
|
|
#define PROTOBUF_DEBUG true
|
|
#else
|