nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1diff --git a/BUILD.bazel b/BUILD.bazel
2index 0f6e41e3a..c0d2bbccf 100644
3--- a/BUILD.bazel
4+++ b/BUILD.bazel
5@@ -138,7 +138,7 @@ cc_library(
6 visibility = ["//visibility:public"],
7 deps = [":protobuf_lite"] + select({
8 "//build_defs:config_msvc": [],
9- "//conditions:default": ["@zlib//:zlib"],
10+ "//conditions:default": ["//external:zlib"],
11 }),
12 )
13
14@@ -755,7 +820,7 @@ cc_test(
15 "@com_google_googletest//:gtest_main",
16 ] + select({
17 "//build_defs:config_msvc": [],
18- "//conditions:default": ["@zlib//:zlib"],
19+ "//conditions:default": ["//external:zlib"],
20 }),
21 )
22
23diff --git a/python/google/protobuf/__init__.py b/python/google/protobuf/__init__.py
24index e7555ee10..a93beb1c5 100644
25--- a/python/google/protobuf/__init__.py
26+++ b/python/google/protobuf/__init__.py
27@@ -31,3 +31,10 @@
28 # Copyright 2007 Google Inc. All Rights Reserved.
29
30 __version__ = '4.21.12'
31+
32+
33+if __name__ != '__main__':
34+ try:
35+ __import__('pkg_resources').declare_namespace(__name__)
36+ except ImportError:
37+ __path__ = __import__('pkgutil').extend_path(__path__, __name__)
38diff --git a/src/google/protobuf/generated_message_tctable_lite.cc b/src/google/protobuf/generated_message_tctable_lite.cc
39index 9993811dc..d80006af7 100644
40--- a/src/google/protobuf/generated_message_tctable_lite.cc
41+++ b/src/google/protobuf/generated_message_tctable_lite.cc
42@@ -343,11 +343,6 @@ const char* TcParser::MiniParse(PROTOBUF_TC_PARAM_DECL) {
43
44 namespace {
45
46-// Offset returns the address `offset` bytes after `base`.
47-inline void* Offset(void* base, uint32_t offset) {
48- return static_cast<uint8_t*>(base) + offset;
49-}
50-
51 // InvertPacked changes tag bits from the given wire type to length
52 // delimited. This is the difference expected between packed and non-packed
53 // repeated fields.