aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFeng Xiao <xfxyjwf@gmail.com>2018-08-13 12:32:21 -0700
committerFeng Xiao <xfxyjwf@gmail.com>2018-08-13 12:32:21 -0700
commit14be563f00b5fd04e50c44420bef6e5061080156 (patch)
tree305de6fec737246373cd50f3accdf02ebf461037 /src
parentba8692fbade4ba329cc4531e286ab5a8e0821d97 (diff)
downloadprotobuf-14be563f00b5fd04e50c44420bef6e5061080156.tar.gz
protobuf-14be563f00b5fd04e50c44420bef6e5061080156.tar.bz2
protobuf-14be563f00b5fd04e50c44420bef6e5061080156.zip
Down-integrate proto2 namespace fix.
Diffstat (limited to 'src')
-rw-r--r--src/google/protobuf/any.pb.h2
-rw-r--r--src/google/protobuf/api.pb.h6
-rw-r--r--src/google/protobuf/compiler/command_line_interface.h4
-rw-r--r--src/google/protobuf/compiler/cpp/cpp_helpers.cc2
-rw-r--r--src/google/protobuf/compiler/cpp/cpp_helpers.h2
-rw-r--r--src/google/protobuf/compiler/cpp/cpp_message.cc9
-rw-r--r--src/google/protobuf/compiler/cpp/cpp_message_field.cc2
-rw-r--r--src/google/protobuf/compiler/cpp/cpp_unittest.h6
-rw-r--r--src/google/protobuf/compiler/cpp/cpp_unittest.inc2
-rw-r--r--src/google/protobuf/compiler/package_info.h2
-rw-r--r--src/google/protobuf/compiler/plugin.pb.h8
-rw-r--r--src/google/protobuf/descriptor.pb.h54
-rw-r--r--src/google/protobuf/duration.pb.h2
-rw-r--r--src/google/protobuf/empty.pb.h2
-rw-r--r--src/google/protobuf/extension_set.h2
-rw-r--r--src/google/protobuf/field_mask.pb.h2
-rw-r--r--src/google/protobuf/generated_message_reflection.cc6
-rw-r--r--src/google/protobuf/generated_message_reflection.h2
-rw-r--r--src/google/protobuf/generated_message_reflection_unittest.cc8
-rw-r--r--src/google/protobuf/io/package_info.h2
-rw-r--r--src/google/protobuf/map_entry.h4
-rw-r--r--src/google/protobuf/message.cc22
-rw-r--r--src/google/protobuf/message.h18
-rw-r--r--src/google/protobuf/message_lite.h2
-rw-r--r--src/google/protobuf/metadata.h2
-rw-r--r--src/google/protobuf/reflection.h4
-rw-r--r--src/google/protobuf/reflection_internal.h2
-rw-r--r--src/google/protobuf/repeated_field_unittest.cc4
-rw-r--r--src/google/protobuf/service.h2
-rw-r--r--src/google/protobuf/source_context.pb.h2
-rw-r--r--src/google/protobuf/struct.pb.cc2
-rw-r--r--src/google/protobuf/struct.pb.h8
-rw-r--r--src/google/protobuf/text_format.h6
-rw-r--r--src/google/protobuf/timestamp.pb.h2
-rw-r--r--src/google/protobuf/type.pb.h10
-rw-r--r--src/google/protobuf/wrappers.pb.h18
36 files changed, 117 insertions, 116 deletions
diff --git a/src/google/protobuf/any.pb.h b/src/google/protobuf/any.pb.h
index 60d2e4cc..a5ad5827 100644
--- a/src/google/protobuf/any.pb.h
+++ b/src/google/protobuf/any.pb.h
@@ -138,7 +138,7 @@ class LIBPROTOBUF_EXPORT Any : public ::google::protobuf::Message /* @@protoc_in
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
diff --git a/src/google/protobuf/api.pb.h b/src/google/protobuf/api.pb.h
index cea0ffe1..5af8aaf2 100644
--- a/src/google/protobuf/api.pb.h
+++ b/src/google/protobuf/api.pb.h
@@ -132,7 +132,7 @@ class LIBPROTOBUF_EXPORT Api : public ::google::protobuf::Message /* @@protoc_in
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
@@ -322,7 +322,7 @@ class LIBPROTOBUF_EXPORT Method : public ::google::protobuf::Message /* @@protoc
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
@@ -505,7 +505,7 @@ class LIBPROTOBUF_EXPORT Mixin : public ::google::protobuf::Message /* @@protoc_
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
diff --git a/src/google/protobuf/compiler/command_line_interface.h b/src/google/protobuf/compiler/command_line_interface.h
index acd2f84a..8dba9949 100644
--- a/src/google/protobuf/compiler/command_line_interface.h
+++ b/src/google/protobuf/compiler/command_line_interface.h
@@ -73,10 +73,10 @@ class DiskSourceTree; // importer.h
// then write a main() procedure like this:
//
// int main(int argc, char* argv[]) {
-// proto2::compiler::CommandLineInterface cli;
+// google::protobuf::compiler::CommandLineInterface cli;
//
// // Support generation of C++ source and headers.
-// proto2::compiler::cpp::CppGenerator cpp_generator;
+// google::protobuf::compiler::cpp::CppGenerator cpp_generator;
// cli.RegisterGenerator("--cpp_out", &cpp_generator,
// "Generate C++ source and header.");
//
diff --git a/src/google/protobuf/compiler/cpp/cpp_helpers.cc b/src/google/protobuf/compiler/cpp/cpp_helpers.cc
index e565a0c5..bc0a9264 100644
--- a/src/google/protobuf/compiler/cpp/cpp_helpers.cc
+++ b/src/google/protobuf/compiler/cpp/cpp_helpers.cc
@@ -1324,7 +1324,7 @@ void GenerateCaseBody(internal::WireFormatLite::WireType wiretype,
format(
"object = "
"CastToBase(&msg->$1$_)->AddWeak(reinterpret_cast<const "
- "::proto2::MessageLite*>(&$2$::_$3$_default_instance_));\n",
+ "::google::protobuf::MessageLite*>(&$2$::_$3$_default_instance_));\n",
FieldName(field), Namespace(field->message_type()),
ClassName(field->message_type()));
}
diff --git a/src/google/protobuf/compiler/cpp/cpp_helpers.h b/src/google/protobuf/compiler/cpp/cpp_helpers.h
index 98cd9c57..c01329fa 100644
--- a/src/google/protobuf/compiler/cpp/cpp_helpers.h
+++ b/src/google/protobuf/compiler/cpp/cpp_helpers.h
@@ -135,7 +135,7 @@ string DefaultInstanceName(const Descriptor* descriptor);
// fields.
string ReferenceFunctionName(const Descriptor* descriptor);
-// Name of the base class: proto2::Message or proto2::MessageLite.
+// Name of the base class: google::protobuf::Message or google::protobuf::MessageLite.
string SuperClassName(const Descriptor* descriptor, const Options& options);
// Get the (unqualified) name that should be used for this field in C++ code.
diff --git a/src/google/protobuf/compiler/cpp/cpp_message.cc b/src/google/protobuf/compiler/cpp/cpp_message.cc
index 5e9e1a6d..e219d784 100644
--- a/src/google/protobuf/compiler/cpp/cpp_message.cc
+++ b/src/google/protobuf/compiler/cpp/cpp_message.cc
@@ -941,7 +941,7 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) {
"public:\n"
"#if $GOOGLE_PROTOBUF$_ENABLE_EXPERIMENTAL_PARSER\n"
" static const char* _InternalParse(const char* begin, const char* "
- "end, void* object, ::proto2::internal::ParseContext* ctx);\n"
+ "end, void* object, ::$proto_ns$::internal::ParseContext* ctx);\n"
"#endif // $GOOGLE_PROTOBUF$_ENABLE_EXPERIMENTAL_PARSER\n"
" typedef ::$proto_ns$::internal::MapEntry$lite$<$classname$, \n"
" $key_cpp$, $val_cpp$,\n"
@@ -1158,7 +1158,7 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) {
"size_t ByteSizeLong() const final;\n"
"#if $GOOGLE_PROTOBUF$_ENABLE_EXPERIMENTAL_PARSER\n"
"static const char* _InternalParse(const char* begin, const char* end, "
- "void* object, ::proto2::internal::ParseContext* ctx);\n"
+ "void* object, ::$proto_ns$::internal::ParseContext* ctx);\n"
"::$proto_ns$::internal::ParseFunc _ParseFunc() const final { return "
"_InternalParse; }\n"
"#else\n"
@@ -1170,7 +1170,8 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) {
format(
"#if $GOOGLE_PROTOBUF$_ENABLE_EXPERIMENTAL_PARSER\n"
"static const char* InternalParseMessageSetItem(const char* begin, "
- "const char* end, void* object, ::proto2::internal::ParseContext* "
+ "const char* end, void* object, "
+ "::$proto_ns$::internal::ParseContext* "
"ctx);\n"
"#endif // $GOOGLE_PROTOBUF$_ENABLE_EXPERIMENTAL_PARSER\n");
}
@@ -1879,7 +1880,7 @@ void MessageGenerator::GenerateClassMethods(io::Printer* printer) {
format(
"#if $GOOGLE_PROTOBUF$_ENABLE_EXPERIMENTAL_PARSER\n"
"const char* $classname$::_InternalParse(const char* begin, const "
- "char* end, void* object, ::proto2::internal::ParseContext* ctx) { "
+ "char* end, void* object, ::$proto_ns$::internal::ParseContext* ctx) { "
"return end; }\n"
"#endif // $GOOGLE_PROTOBUF$_ENABLE_EXPERIMENTAL_PARSER\n");
format("\n");
diff --git a/src/google/protobuf/compiler/cpp/cpp_message_field.cc b/src/google/protobuf/compiler/cpp/cpp_message_field.cc
index 0bbf35b2..afb27273 100644
--- a/src/google/protobuf/compiler/cpp/cpp_message_field.cc
+++ b/src/google/protobuf/compiler/cpp/cpp_message_field.cc
@@ -48,7 +48,7 @@ namespace {
// When we are generating code for implicit weak fields, we need to insert some
// additional casts. These functions return the casted expression if
// implicit_weak_field is true but otherwise return the original expression.
-// Ordinarily a static_cast is enough to cast proto2::MessageLite* to a class
+// Ordinarily a static_cast is enough to cast google::protobuf::MessageLite* to a class
// deriving from it, but we need a reinterpret_cast in cases where the generated
// message is forward-declared but its full definition is not visible.
string StaticCast(const string& type, const string& expression,
diff --git a/src/google/protobuf/compiler/cpp/cpp_unittest.h b/src/google/protobuf/compiler/cpp/cpp_unittest.h
index d2dcf0a5..c5dc767a 100644
--- a/src/google/protobuf/compiler/cpp/cpp_unittest.h
+++ b/src/google/protobuf/compiler/cpp/cpp_unittest.h
@@ -28,14 +28,14 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// This header declares the namespace proto2::protobuf_unittest in order to expose
+// This header declares the namespace google::protobuf::protobuf_unittest in order to expose
// any problems with the generated class names. We use this header to ensure
// unittest.cc will declare the namespace prior to other includes, while obeying
// normal include ordering.
//
// When generating a class name of "foo.Bar" we must ensure we prefix the class
-// name with "::", in case the namespace proto2::foo exists. We intentionally
-// trigger that case here by declaring proto2::protobuf_unittest.
+// name with "::", in case the namespace google::protobuf::foo exists. We intentionally
+// trigger that case here by declaring google::protobuf::protobuf_unittest.
//
// See ClassName in helpers.h for more details.
diff --git a/src/google/protobuf/compiler/cpp/cpp_unittest.inc b/src/google/protobuf/compiler/cpp/cpp_unittest.inc
index bb37b4ac..0604731f 100644
--- a/src/google/protobuf/compiler/cpp/cpp_unittest.inc
+++ b/src/google/protobuf/compiler/cpp/cpp_unittest.inc
@@ -105,7 +105,7 @@ class MockErrorCollector : public MultiFileErrorCollector {
#ifndef PROTOBUF_TEST_NO_DESCRIPTORS
// Test that generated code has proper descriptors:
-// Parse a descriptor directly (using proto2::compiler::Importer) and
+// Parse a descriptor directly (using google::protobuf::compiler::Importer) and
// compare it to the one that was produced by generated code.
TEST(GENERATED_DESCRIPTOR_TEST_NAME, IdenticalDescriptors) {
const FileDescriptor* generated_descriptor =
diff --git a/src/google/protobuf/compiler/package_info.h b/src/google/protobuf/compiler/package_info.h
index 405e21fa..105ef601 100644
--- a/src/google/protobuf/compiler/package_info.h
+++ b/src/google/protobuf/compiler/package_info.h
@@ -32,7 +32,7 @@
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
//
-// This file exists solely to document the proto2::compiler namespace.
+// This file exists solely to document the google::protobuf::compiler namespace.
// It is not compiled into anything, but it may be read by an automated
// documentation generator.
diff --git a/src/google/protobuf/compiler/plugin.pb.h b/src/google/protobuf/compiler/plugin.pb.h
index 55569b5e..4b7527e5 100644
--- a/src/google/protobuf/compiler/plugin.pb.h
+++ b/src/google/protobuf/compiler/plugin.pb.h
@@ -151,7 +151,7 @@ class LIBPROTOC_EXPORT Version : public ::google::protobuf::Message /* @@protoc_
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
@@ -303,7 +303,7 @@ class LIBPROTOC_EXPORT CodeGeneratorRequest : public ::google::protobuf::Message
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
@@ -477,7 +477,7 @@ class LIBPROTOC_EXPORT CodeGeneratorResponse_File : public ::google::protobuf::M
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
@@ -637,7 +637,7 @@ class LIBPROTOC_EXPORT CodeGeneratorResponse : public ::google::protobuf::Messag
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
diff --git a/src/google/protobuf/descriptor.pb.h b/src/google/protobuf/descriptor.pb.h
index 99d66d00..3459a073 100644
--- a/src/google/protobuf/descriptor.pb.h
+++ b/src/google/protobuf/descriptor.pb.h
@@ -376,7 +376,7 @@ class LIBPROTOBUF_EXPORT FileDescriptorSet : public ::google::protobuf::Message
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
@@ -516,7 +516,7 @@ class LIBPROTOBUF_EXPORT FileDescriptorProto : public ::google::protobuf::Messag
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
@@ -845,7 +845,7 @@ class LIBPROTOBUF_EXPORT DescriptorProto_ExtensionRange : public ::google::proto
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
@@ -1001,7 +1001,7 @@ class LIBPROTOBUF_EXPORT DescriptorProto_ReservedRange : public ::google::protob
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
@@ -1144,7 +1144,7 @@ class LIBPROTOBUF_EXPORT DescriptorProto : public ::google::protobuf::Message /*
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
@@ -1426,7 +1426,7 @@ class LIBPROTOBUF_EXPORT ExtensionRangeOptions : public ::google::protobuf::Mess
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
@@ -1569,7 +1569,7 @@ class LIBPROTOBUF_EXPORT FieldDescriptorProto : public ::google::protobuf::Messa
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
@@ -1952,7 +1952,7 @@ class LIBPROTOBUF_EXPORT OneofDescriptorProto : public ::google::protobuf::Messa
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
@@ -2117,7 +2117,7 @@ class LIBPROTOBUF_EXPORT EnumDescriptorProto_EnumReservedRange : public ::google
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
@@ -2260,7 +2260,7 @@ class LIBPROTOBUF_EXPORT EnumDescriptorProto : public ::google::protobuf::Messag
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
@@ -2476,7 +2476,7 @@ class LIBPROTOBUF_EXPORT EnumValueDescriptorProto : public ::google::protobuf::M
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
@@ -2649,7 +2649,7 @@ class LIBPROTOBUF_EXPORT ServiceDescriptorProto : public ::google::protobuf::Mes
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
@@ -2827,7 +2827,7 @@ class LIBPROTOBUF_EXPORT MethodDescriptorProto : public ::google::protobuf::Mess
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
@@ -3058,7 +3058,7 @@ class LIBPROTOBUF_EXPORT FileOptions : public ::google::protobuf::Message /* @@p
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
@@ -3559,7 +3559,7 @@ class LIBPROTOBUF_EXPORT MessageOptions : public ::google::protobuf::Message /*
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
@@ -3734,7 +3734,7 @@ class LIBPROTOBUF_EXPORT FieldOptions : public ::google::protobuf::Message /* @@
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
@@ -3981,7 +3981,7 @@ class LIBPROTOBUF_EXPORT OneofOptions : public ::google::protobuf::Message /* @@
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
@@ -4124,7 +4124,7 @@ class LIBPROTOBUF_EXPORT EnumOptions : public ::google::protobuf::Message /* @@p
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
@@ -4283,7 +4283,7 @@ class LIBPROTOBUF_EXPORT EnumValueOptions : public ::google::protobuf::Message /
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
@@ -4434,7 +4434,7 @@ class LIBPROTOBUF_EXPORT ServiceOptions : public ::google::protobuf::Message /*
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
@@ -4585,7 +4585,7 @@ class LIBPROTOBUF_EXPORT MethodOptions : public ::google::protobuf::Message /* @
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
@@ -4772,7 +4772,7 @@ class LIBPROTOBUF_EXPORT UninterpretedOption_NamePart : public ::google::protobu
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
@@ -4935,7 +4935,7 @@ class LIBPROTOBUF_EXPORT UninterpretedOption : public ::google::protobuf::Messag
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
@@ -5176,7 +5176,7 @@ class LIBPROTOBUF_EXPORT SourceCodeInfo_Location : public ::google::protobuf::Me
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
@@ -5404,7 +5404,7 @@ class LIBPROTOBUF_EXPORT SourceCodeInfo : public ::google::protobuf::Message /*
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
@@ -5546,7 +5546,7 @@ class LIBPROTOBUF_EXPORT GeneratedCodeInfo_Annotation : public ::google::protobu
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
@@ -5728,7 +5728,7 @@ class LIBPROTOBUF_EXPORT GeneratedCodeInfo : public ::google::protobuf::Message
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
diff --git a/src/google/protobuf/duration.pb.h b/src/google/protobuf/duration.pb.h
index b66e343a..1d32e1bb 100644
--- a/src/google/protobuf/duration.pb.h
+++ b/src/google/protobuf/duration.pb.h
@@ -129,7 +129,7 @@ class LIBPROTOBUF_EXPORT Duration : public ::google::protobuf::Message /* @@prot
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
diff --git a/src/google/protobuf/empty.pb.h b/src/google/protobuf/empty.pb.h
index 7d88bb92..65f0b192 100644
--- a/src/google/protobuf/empty.pb.h
+++ b/src/google/protobuf/empty.pb.h
@@ -129,7 +129,7 @@ class LIBPROTOBUF_EXPORT Empty : public ::google::protobuf::Message /* @@protoc_
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
diff --git a/src/google/protobuf/extension_set.h b/src/google/protobuf/extension_set.h
index 9f08e62e..c22dfe07 100644
--- a/src/google/protobuf/extension_set.h
+++ b/src/google/protobuf/extension_set.h
@@ -1241,7 +1241,7 @@ class RepeatedMessageTypeTraits {
// See notes above in RepeatedEnumTypeTraits::GetRepeated(): same
// casting hack applies here, because a RepeatedPtrField<MessageLite>
// cannot naturally become a RepeatedPtrType<Type> even though Type is
- // presumably a message. proto2::Message goes through similar contortions
+ // presumably a message. google::protobuf::Message goes through similar contortions
// with a reinterpret_cast<>.
return *reinterpret_cast<const RepeatedPtrField<Type>*>(
set.GetRawRepeatedField(number, GetDefaultRepeatedField()));
diff --git a/src/google/protobuf/field_mask.pb.h b/src/google/protobuf/field_mask.pb.h
index b46d4997..2055e964 100644
--- a/src/google/protobuf/field_mask.pb.h
+++ b/src/google/protobuf/field_mask.pb.h
@@ -129,7 +129,7 @@ class LIBPROTOBUF_EXPORT FieldMask : public ::google::protobuf::Message /* @@pro
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
diff --git a/src/google/protobuf/generated_message_reflection.cc b/src/google/protobuf/generated_message_reflection.cc
index b6d773fe..e24f0306 100644
--- a/src/google/protobuf/generated_message_reflection.cc
+++ b/src/google/protobuf/generated_message_reflection.cc
@@ -103,7 +103,7 @@ void ReportReflectionUsageError(
const char* method, const char* description) {
GOOGLE_LOG(FATAL)
<< "Protocol Buffer reflection usage error:\n"
- " Method : proto2::Reflection::" << method << "\n"
+ " Method : google::protobuf::Reflection::" << method << "\n"
" Message type: " << descriptor->full_name() << "\n"
" Field : " << field->full_name() << "\n"
" Problem : " << description;
@@ -129,7 +129,7 @@ static void ReportReflectionUsageTypeError(
FieldDescriptor::CppType expected_type) {
GOOGLE_LOG(FATAL)
<< "Protocol Buffer reflection usage error:\n"
- " Method : proto2::Reflection::" << method << "\n"
+ " Method : google::protobuf::Reflection::" << method << "\n"
" Message type: " << descriptor->full_name() << "\n"
" Field : " << field->full_name() << "\n"
" Problem : Field is not the right type for this message:\n"
@@ -142,7 +142,7 @@ static void ReportReflectionUsageEnumTypeError(
const char* method, const EnumValueDescriptor* value) {
GOOGLE_LOG(FATAL)
<< "Protocol Buffer reflection usage error:\n"
- " Method : proto2::Reflection::" << method << "\n"
+ " Method : google::protobuf::Reflection::" << method << "\n"
" Message type: " << descriptor->full_name() << "\n"
" Field : " << field->full_name() << "\n"
" Problem : Enum value did not match field type:\n"
diff --git a/src/google/protobuf/generated_message_reflection.h b/src/google/protobuf/generated_message_reflection.h
index 00139a9e..177312cf 100644
--- a/src/google/protobuf/generated_message_reflection.h
+++ b/src/google/protobuf/generated_message_reflection.h
@@ -138,7 +138,7 @@ class WeakFieldMap; // weak_field_map.h
// -1.
struct ReflectionSchema {
public:
- // Size of a proto2::Message object of this type.
+ // Size of a google::protobuf::Message object of this type.
uint32 GetObjectSize() const { return static_cast<uint32>(object_size_); }
// Offset of a non-oneof field. Getting a field offset is slightly more
diff --git a/src/google/protobuf/generated_message_reflection_unittest.cc b/src/google/protobuf/generated_message_reflection_unittest.cc
index 09715c5d..c74e4f5e 100644
--- a/src/google/protobuf/generated_message_reflection_unittest.cc
+++ b/src/google/protobuf/generated_message_reflection_unittest.cc
@@ -1002,7 +1002,7 @@ TEST(GeneratedMessageReflectionTest, UsageErrors) {
reflection->GetInt32(
message, descriptor->FindFieldByName("optional_int64")),
"Protocol Buffer reflection usage error:\n"
- " Method : proto2::Reflection::GetInt32\n"
+ " Method : google::protobuf::Reflection::GetInt32\n"
" Message type: protobuf_unittest\\.TestAllTypes\n"
" Field : protobuf_unittest\\.TestAllTypes\\.optional_int64\n"
" Problem : Field is not the right type for this message:\n"
@@ -1012,7 +1012,7 @@ TEST(GeneratedMessageReflectionTest, UsageErrors) {
reflection->GetInt32(
message, descriptor->FindFieldByName("repeated_int32")),
"Protocol Buffer reflection usage error:\n"
- " Method : proto2::Reflection::GetInt32\n"
+ " Method : google::protobuf::Reflection::GetInt32\n"
" Message type: protobuf_unittest.TestAllTypes\n"
" Field : protobuf_unittest.TestAllTypes.repeated_int32\n"
" Problem : Field is repeated; the method requires a singular field.");
@@ -1020,7 +1020,7 @@ TEST(GeneratedMessageReflectionTest, UsageErrors) {
reflection->GetInt32(
message, unittest::ForeignMessage::descriptor()->FindFieldByName("c")),
"Protocol Buffer reflection usage error:\n"
- " Method : proto2::Reflection::GetInt32\n"
+ " Method : google::protobuf::Reflection::GetInt32\n"
" Message type: protobuf_unittest.TestAllTypes\n"
" Field : protobuf_unittest.ForeignMessage.c\n"
" Problem : Field does not match message type.");
@@ -1028,7 +1028,7 @@ TEST(GeneratedMessageReflectionTest, UsageErrors) {
reflection->HasField(
message, unittest::ForeignMessage::descriptor()->FindFieldByName("c")),
"Protocol Buffer reflection usage error:\n"
- " Method : proto2::Reflection::HasField\n"
+ " Method : google::protobuf::Reflection::HasField\n"
" Message type: protobuf_unittest.TestAllTypes\n"
" Field : protobuf_unittest.ForeignMessage.c\n"
" Problem : Field does not match message type.");
diff --git a/src/google/protobuf/io/package_info.h b/src/google/protobuf/io/package_info.h
index a3a5dbeb..46c3dac9 100644
--- a/src/google/protobuf/io/package_info.h
+++ b/src/google/protobuf/io/package_info.h
@@ -32,7 +32,7 @@
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
//
-// This file exists solely to document the proto2::io namespace.
+// This file exists solely to document the google::protobuf::io namespace.
// It is not compiled into anything, but it may be read by an automated
// documentation generator.
diff --git a/src/google/protobuf/map_entry.h b/src/google/protobuf/map_entry.h
index 05a31189..53f35077 100644
--- a/src/google/protobuf/map_entry.h
+++ b/src/google/protobuf/map_entry.h
@@ -62,8 +62,8 @@ namespace google {
namespace protobuf {
namespace internal {
-// MapEntry is the returned proto2::Message when calling AddMessage of
-// proto2::Reflection. In order to let it work with generated message
+// MapEntry is the returned google::protobuf::Message when calling AddMessage of
+// google::protobuf::Reflection. In order to let it work with generated message
// reflection, its in-memory type is the same as generated message with the same
// fields. However, in order to decide the in-memory type of key/value, we need
// to know both their cpp type in generated api and proto type. In
diff --git a/src/google/protobuf/message.cc b/src/google/protobuf/message.cc
index eac70d88..b5a624b7 100644
--- a/src/google/protobuf/message.cc
+++ b/src/google/protobuf/message.cc
@@ -154,28 +154,28 @@ namespace internal {
class ReflectionAccessor {
public:
- static void* GetOffset(void* msg, const proto2::FieldDescriptor* f,
- const proto2::Reflection* r) {
+ static void* GetOffset(void* msg, const google::protobuf::FieldDescriptor* f,
+ const google::protobuf::Reflection* r) {
auto gr =
- dynamic_cast<const proto2::internal::GeneratedMessageReflection*>(r);
+ dynamic_cast<const google::protobuf::internal::GeneratedMessageReflection*>(r);
GOOGLE_CHECK(gr != nullptr);
return static_cast<char*>(msg) + gr->schema_.GetFieldOffset(f);
}
- static proto2::internal::ExtensionSet* GetExtensionSet(
- void* msg, const proto2::Reflection* r) {
+ static google::protobuf::internal::ExtensionSet* GetExtensionSet(
+ void* msg, const google::protobuf::Reflection* r) {
auto gr =
- dynamic_cast<const proto2::internal::GeneratedMessageReflection*>(r);
+ dynamic_cast<const google::protobuf::internal::GeneratedMessageReflection*>(r);
GOOGLE_CHECK(gr != nullptr);
- return reinterpret_cast<proto2::internal::ExtensionSet*>(
+ return reinterpret_cast<google::protobuf::internal::ExtensionSet*>(
static_cast<char*>(msg) + gr->schema_.GetExtensionSetOffset());
}
- static proto2::internal::InternalMetadataWithArena* GetMetadata(
- void* msg, const proto2::Reflection* r) {
+ static google::protobuf::internal::InternalMetadataWithArena* GetMetadata(
+ void* msg, const google::protobuf::Reflection* r) {
auto gr =
- dynamic_cast<const proto2::internal::GeneratedMessageReflection*>(r);
+ dynamic_cast<const google::protobuf::internal::GeneratedMessageReflection*>(r);
GOOGLE_CHECK(gr != nullptr);
- return reinterpret_cast<proto2::internal::InternalMetadataWithArena*>(
+ return reinterpret_cast<google::protobuf::internal::InternalMetadataWithArena*>(
static_cast<char*>(msg) + gr->schema_.GetMetadataOffset());
}
};
diff --git a/src/google/protobuf/message.h b/src/google/protobuf/message.h
index 24f9fb56..023660c0 100644
--- a/src/google/protobuf/message.h
+++ b/src/google/protobuf/message.h
@@ -802,7 +802,7 @@ class LIBPROTOBUF_EXPORT Reflection {
// CPPTYPE_BOOL bool
// CPPTYPE_ENUM generated enum type or int32
// CPPTYPE_STRING string
- // CPPTYPE_MESSAGE generated message type or proto2::Message
+ // CPPTYPE_MESSAGE generated message type or google::protobuf::Message
//
// A RepeatedFieldRef object can be copied and the resulted object will point
// to the same repeated field in the same message. The object can be used as
@@ -855,8 +855,8 @@ class LIBPROTOBUF_EXPORT Reflection {
// DEPRECATED. Please use GetRepeatedFieldRef().
//
- // for T = string, proto2::internal::StringPieceField
- // proto2::Message & descendants.
+ // for T = string, google::protobuf::internal::StringPieceField
+ // google::protobuf::Message & descendants.
template <typename T>
GOOGLE_PROTOBUF_DEPRECATED_MSG(
"Please use GetRepeatedFieldRef() instead")
@@ -865,8 +865,8 @@ class LIBPROTOBUF_EXPORT Reflection {
// DEPRECATED. Please use GetMutableRepeatedFieldRef().
//
- // for T = string, proto2::internal::StringPieceField
- // proto2::Message & descendants.
+ // for T = string, google::protobuf::internal::StringPieceField
+ // google::protobuf::Message & descendants.
template <typename T>
GOOGLE_PROTOBUF_DEPRECATED_MSG(
"Please use GetMutableRepeatedFieldRef() instead")
@@ -921,7 +921,7 @@ class LIBPROTOBUF_EXPORT Reflection {
// useful for determining if a message is a generated message or not, for
// example:
// if (message->GetReflection()->GetMessageFactory() ==
- // proto2::MessageFactory::generated_factory()) {
+ // google::protobuf::MessageFactory::generated_factory()) {
// // This is a generated message.
// }
// It can also be used to create more messages of this type, though
@@ -1155,7 +1155,7 @@ const T* DynamicCastToGenerated(const Message* from) {
const T&(*get_default_instance)() = &T::default_instance;
(void)get_default_instance;
- // Compile-time assert that T is a subclass of proto2::Message.
+ // Compile-time assert that T is a subclass of google::protobuf::Message.
const Message* unused = static_cast<T*>(nullptr);
(void)unused;
@@ -1192,8 +1192,8 @@ T dynamic_cast_if_available(Message* from) {
// Implementation details for {Get,Mutable}RawRepeatedPtrField. We provide
// specializations for <string>, <StringPieceField> and <Message> and handle
// everything else with the default template which will match any type having
-// a method with signature "static const proto2::Descriptor* descriptor()".
-// Such a type presumably is a descendant of proto2::Message.
+// a method with signature "static const google::protobuf::Descriptor* descriptor()".
+// Such a type presumably is a descendant of google::protobuf::Message.
template<>
inline const RepeatedPtrField<string>& Reflection::GetRepeatedPtrField<string>(
diff --git a/src/google/protobuf/message_lite.h b/src/google/protobuf/message_lite.h
index 2e83a8a7..21d54915 100644
--- a/src/google/protobuf/message_lite.h
+++ b/src/google/protobuf/message_lite.h
@@ -268,7 +268,7 @@ class LIBPROTOBUF_EXPORT MessageLite {
// This function takes a string in the (non-human-readable) binary wire
// format, matching the encoding output by MessageLite::SerializeToString().
// If you'd like to convert a human-readable string into a protocol buffer
- // object, see proto2::TextFormat::ParseFromString().
+ // object, see google::protobuf::TextFormat::ParseFromString().
bool ParseFromString(const string& data);
// Like ParseFromString(), but accepts messages that are missing
// required fields.
diff --git a/src/google/protobuf/metadata.h b/src/google/protobuf/metadata.h
index 18b81767..928bbf5c 100644
--- a/src/google/protobuf/metadata.h
+++ b/src/google/protobuf/metadata.h
@@ -32,7 +32,7 @@
// metadata (Unknown-field set, Arena pointer, ...) and allows its
// representation to be made more space-efficient via various optimizations.
//
-// Note that this is distinct from proto2::Metadata, which encapsulates
+// Note that this is distinct from google::protobuf::Metadata, which encapsulates
// Descriptor and Reflection pointers.
#ifndef GOOGLE_PROTOBUF_METADATA_H__
diff --git a/src/google/protobuf/reflection.h b/src/google/protobuf/reflection.h
index 236a68b6..c14a896c 100644
--- a/src/google/protobuf/reflection.h
+++ b/src/google/protobuf/reflection.h
@@ -337,8 +337,8 @@ namespace internal {
// CPPTYPE_BOOL bool bool
// CPPTYPE_ENUM generated enum type int32
// CPPTYPE_STRING string string
-// CPPTYPE_MESSAGE generated message type proto2::Message
-// or proto2::Message
+// CPPTYPE_MESSAGE generated message type google::protobuf::Message
+// or google::protobuf::Message
//
// Note that for enums we use int32 in the interface.
//
diff --git a/src/google/protobuf/reflection_internal.h b/src/google/protobuf/reflection_internal.h
index 6bff0f0d..f664d8e2 100644
--- a/src/google/protobuf/reflection_internal.h
+++ b/src/google/protobuf/reflection_internal.h
@@ -179,7 +179,7 @@ class RepeatedPtrFieldWrapper : public RandomAccessRepeatedFieldAccessor {
}
// Create a new T instance. For repeated message fields, T can be specified
- // as proto2::Message so we can't use "new T()" directly. In that case, value
+ // as google::protobuf::Message so we can't use "new T()" directly. In that case, value
// should be a message of the same type (it's ensured by the caller) and a
// new message object will be created using it.
virtual T* New(const Value* value) const = 0;
diff --git a/src/google/protobuf/repeated_field_unittest.cc b/src/google/protobuf/repeated_field_unittest.cc
index 5d399af8..fa86c593 100644
--- a/src/google/protobuf/repeated_field_unittest.cc
+++ b/src/google/protobuf/repeated_field_unittest.cc
@@ -1651,8 +1651,8 @@ TEST_F(RepeatedPtrFieldPtrsIteratorTest, Sort) {
// -----------------------------------------------------------------------------
// Unit-tests for the insert iterators
-// proto2::RepeatedFieldBackInserter,
-// proto2::AllocatedRepeatedPtrFieldBackInserter
+// google::protobuf::RepeatedFieldBackInserter,
+// google::protobuf::AllocatedRepeatedPtrFieldBackInserter
// Ported from util/gtl/proto-array-iterators_unittest.
class RepeatedFieldInsertionIteratorsTest : public testing::Test {
diff --git a/src/google/protobuf/service.h b/src/google/protobuf/service.h
index 3818f721..5c6d068f 100644
--- a/src/google/protobuf/service.h
+++ b/src/google/protobuf/service.h
@@ -61,7 +61,7 @@
//
// // implements MyService ---------------------------------------
//
-// void Foo(proto2::RpcController* controller,
+// void Foo(google::protobuf::RpcController* controller,
// const MyRequest* request,
// MyResponse* response,
// Closure* done) {
diff --git a/src/google/protobuf/source_context.pb.h b/src/google/protobuf/source_context.pb.h
index 5d4dae81..5355e1c0 100644
--- a/src/google/protobuf/source_context.pb.h
+++ b/src/google/protobuf/source_context.pb.h
@@ -122,7 +122,7 @@ class LIBPROTOBUF_EXPORT SourceContext : public ::google::protobuf::Message /* @
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
diff --git a/src/google/protobuf/struct.pb.cc b/src/google/protobuf/struct.pb.cc
index d34b77c5..4294f407 100644
--- a/src/google/protobuf/struct.pb.cc
+++ b/src/google/protobuf/struct.pb.cc
@@ -207,7 +207,7 @@ void Struct_FieldsEntry_DoNotUse::MergeFrom(
}
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-const char* Struct_FieldsEntry_DoNotUse::_InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx) { return end; }
+const char* Struct_FieldsEntry_DoNotUse::_InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx) { return end; }
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
diff --git a/src/google/protobuf/struct.pb.h b/src/google/protobuf/struct.pb.h
index 7ff4465b..fa1f568d 100644
--- a/src/google/protobuf/struct.pb.h
+++ b/src/google/protobuf/struct.pb.h
@@ -103,7 +103,7 @@ class Struct_FieldsEntry_DoNotUse : public ::google::protobuf::internal::MapEntr
0 > {
public:
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
typedef ::google::protobuf::internal::MapEntry<Struct_FieldsEntry_DoNotUse,
::std::string, ::google::protobuf::Value,
@@ -189,7 +189,7 @@ class LIBPROTOBUF_EXPORT Struct : public ::google::protobuf::Message /* @@protoc
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
@@ -334,7 +334,7 @@ class LIBPROTOBUF_EXPORT Value : public ::google::protobuf::Message /* @@protoc_
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
@@ -552,7 +552,7 @@ class LIBPROTOBUF_EXPORT ListValue : public ::google::protobuf::Message /* @@pro
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
diff --git a/src/google/protobuf/text_format.h b/src/google/protobuf/text_format.h
index cb9f90a7..df12f13d 100644
--- a/src/google/protobuf/text_format.h
+++ b/src/google/protobuf/text_format.h
@@ -430,13 +430,13 @@ class LIBPROTOBUF_EXPORT TextFormat {
// Example input: "user {\n id: 123 extra { gender: MALE language: 'en' }\n}"
//
// One use for this function is parsing handwritten strings in test code.
- // Another use is to parse the output from proto2::Message::DebugString()
+ // Another use is to parse the output from google::protobuf::Message::DebugString()
// (or ShortDebugString()), because these functions output using
- // proto2::TextFormat::Print().
+ // google::protobuf::TextFormat::Print().
//
// If you would like to read a protocol buffer serialized in the
// (non-human-readable) binary wire format, see
- // proto2::MessageLite::ParseFromString().
+ // google::protobuf::MessageLite::ParseFromString().
static bool Parse(io::ZeroCopyInputStream* input, Message* output);
// Like Parse(), but reads directly from a string.
static bool ParseFromString(const string& input, Message* output);
diff --git a/src/google/protobuf/timestamp.pb.h b/src/google/protobuf/timestamp.pb.h
index 88b22b23..e77adbe0 100644
--- a/src/google/protobuf/timestamp.pb.h
+++ b/src/google/protobuf/timestamp.pb.h
@@ -129,7 +129,7 @@ class LIBPROTOBUF_EXPORT Timestamp : public ::google::protobuf::Message /* @@pro
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
diff --git a/src/google/protobuf/type.pb.h b/src/google/protobuf/type.pb.h
index b155a8fd..5ae22bbd 100644
--- a/src/google/protobuf/type.pb.h
+++ b/src/google/protobuf/type.pb.h
@@ -230,7 +230,7 @@ class LIBPROTOBUF_EXPORT Type : public ::google::protobuf::Message /* @@protoc_i
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
@@ -442,7 +442,7 @@ class LIBPROTOBUF_EXPORT Field : public ::google::protobuf::Message /* @@protoc_
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
@@ -795,7 +795,7 @@ class LIBPROTOBUF_EXPORT Enum : public ::google::protobuf::Message /* @@protoc_i
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
@@ -984,7 +984,7 @@ class LIBPROTOBUF_EXPORT EnumValue : public ::google::protobuf::Message /* @@pro
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
@@ -1147,7 +1147,7 @@ class LIBPROTOBUF_EXPORT Option : public ::google::protobuf::Message /* @@protoc
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
diff --git a/src/google/protobuf/wrappers.pb.h b/src/google/protobuf/wrappers.pb.h
index 7e3b7d40..dcf4edfe 100644
--- a/src/google/protobuf/wrappers.pb.h
+++ b/src/google/protobuf/wrappers.pb.h
@@ -161,7 +161,7 @@ class LIBPROTOBUF_EXPORT DoubleValue : public ::google::protobuf::Message /* @@p
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
@@ -287,7 +287,7 @@ class LIBPROTOBUF_EXPORT FloatValue : public ::google::protobuf::Message /* @@pr
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
@@ -413,7 +413,7 @@ class LIBPROTOBUF_EXPORT Int64Value : public ::google::protobuf::Message /* @@pr
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
@@ -539,7 +539,7 @@ class LIBPROTOBUF_EXPORT UInt64Value : public ::google::protobuf::Message /* @@p
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
@@ -665,7 +665,7 @@ class LIBPROTOBUF_EXPORT Int32Value : public ::google::protobuf::Message /* @@pr
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
@@ -791,7 +791,7 @@ class LIBPROTOBUF_EXPORT UInt32Value : public ::google::protobuf::Message /* @@p
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
@@ -917,7 +917,7 @@ class LIBPROTOBUF_EXPORT BoolValue : public ::google::protobuf::Message /* @@pro
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
@@ -1043,7 +1043,7 @@ class LIBPROTOBUF_EXPORT StringValue : public ::google::protobuf::Message /* @@p
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(
@@ -1186,7 +1186,7 @@ class LIBPROTOBUF_EXPORT BytesValue : public ::google::protobuf::Message /* @@pr
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::proto2::internal::ParseContext* ctx);
+ static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
#else
bool MergePartialFromCodedStream(