diff --git a/python/google/protobuf/pyext/map_container.cc b/python/google/protobuf/pyext/map_container.cc index cc57d1c2c5..77c61706ff 100644 --- a/python/google/protobuf/pyext/map_container.cc +++ b/python/google/protobuf/pyext/map_container.cc @@ -75,7 +75,7 @@ class MapReflectionFriend { struct MapIterator { PyObject_HEAD; - std::unique_ptr iter; + std::unique_ptr<::google::protobuf::MapIterator> iter; // A pointer back to the container, so we can notice changes to the version. // We own a ref on this. @@ -314,7 +314,7 @@ static MapContainer* GetMap(PyObject* obj) { Py_ssize_t MapReflectionFriend::Length(PyObject* _self) { MapContainer* self = GetMap(_self); - const Message* message = self->message; + const google::protobuf::Message* message = self->message; return message->GetReflection()->MapSize(*message, self->parent_field_descriptor); } @@ -423,7 +423,7 @@ int MapContainer::Release() { // ScalarMap /////////////////////////////////////////////////////////////////// PyObject *NewScalarMapContainer( - CMessage* parent, const FieldDescriptor* parent_field_descriptor) { + CMessage* parent, const google::protobuf::FieldDescriptor* parent_field_descriptor) { if (!CheckFieldBelongsToMessage(parent_field_descriptor, parent->message)) { return NULL; } @@ -704,7 +704,7 @@ static PyObject* GetCMessage(MessageMapContainer* self, Message* message, } PyObject* NewMessageMapContainer( - CMessage* parent, const FieldDescriptor* parent_field_descriptor, + CMessage* parent, const google::protobuf::FieldDescriptor* parent_field_descriptor, CMessageClass* message_class) { if (!CheckFieldBelongsToMessage(parent_field_descriptor, parent->message)) { return NULL; @@ -1011,7 +1011,7 @@ PyObject* MapReflectionFriend::GetIterator(PyObject *_self) { Message* message = self->GetMutableMessage(); const Reflection* reflection = message->GetReflection(); - iter->iter.reset(new google::protobuf::MapIterator( + iter->iter.reset(new ::google::protobuf::MapIterator( reflection->MapBegin(message, self->parent_field_descriptor))); } diff --git a/python/google/protobuf/pyext/message.cc b/python/google/protobuf/pyext/message.cc index e138c93d41..2205f12fdc 100644 --- a/python/google/protobuf/pyext/message.cc +++ b/python/google/protobuf/pyext/message.cc @@ -171,7 +171,7 @@ static int AddDescriptors(PyObject* cls, const Descriptor* descriptor) { // .extensions_by_name[name] // which was defined previously. for (int i = 0; i < descriptor->extension_count(); ++i) { - const FieldDescriptor* field = descriptor->extension(i); + const google::protobuf::FieldDescriptor* field = descriptor->extension(i); ScopedPyObjectPtr extension_field(PyFieldDescriptor_FromDescriptor(field)); if (extension_field == NULL) { return -1; @@ -2344,7 +2344,7 @@ static PyObject* RichCompare(CMessage* self, PyObject* other, int opid) { if (!PyObject_TypeCheck(other, CMessage_Type)) { equals = false; } - const Message* other_message = + const google::protobuf::Message* other_message = reinterpret_cast(other)->message; // If messages don't have the same descriptors, they are not equal. if (equals && @@ -2352,7 +2352,7 @@ static PyObject* RichCompare(CMessage* self, PyObject* other, int opid) { equals = false; } // Check the message contents. - if (equals && !util::MessageDifferencer::Equals( + if (equals && !google::protobuf::util::MessageDifferencer::Equals( *self->message, *reinterpret_cast(other)->message)) { equals = false; diff --git a/src/google/protobuf/any.pb.h b/src/google/protobuf/any.pb.h index 60d2e4cc49..a5ad5827f2 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 cea0ffe13d..5af8aaf237 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 acd2f84a02..8dba994961 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 e565a0c50e..bc0a9264ad 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(&$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 98cd9c5738..c01329fa2a 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 5e9e1a6d49..e219d78432 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 0bbf35b2e3..afb272730d 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 d2dcf0a527..c5dc767ae5 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 bb37b4ac02..0604731f09 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 405e21fa5f..105ef601a5 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 55569b5ece..4b7527e5c9 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 99d66d0011..3459a073c4 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 b66e343a8e..1d32e1bbbf 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 7d88bb920b..65f0b192f9 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 9f08e62e29..c22dfe07f7 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 // cannot naturally become a RepeatedPtrType 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*>( set.GetRawRepeatedField(number, GetDefaultRepeatedField())); diff --git a/src/google/protobuf/field_mask.pb.h b/src/google/protobuf/field_mask.pb.h index b46d49979b..2055e964af 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 b6d773fecc..e24f03063b 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 00139a9ee2..177312cf7a 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(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 09715c5dfb..c74e4f5ee5 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 a3a5dbeb54..46c3dac917 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 05a3118993..53f35077b4 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 eac70d883a..b5a624b718 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(r); + dynamic_cast(r); GOOGLE_CHECK(gr != nullptr); return static_cast(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(r); + dynamic_cast(r); GOOGLE_CHECK(gr != nullptr); - return reinterpret_cast( + return reinterpret_cast( static_cast(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(r); + dynamic_cast(r); GOOGLE_CHECK(gr != nullptr); - return reinterpret_cast( + return reinterpret_cast( static_cast(msg) + gr->schema_.GetMetadataOffset()); } }; diff --git a/src/google/protobuf/message.h b/src/google/protobuf/message.h index 24f9fb56b5..023660c0fc 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 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 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(nullptr); (void)unused; @@ -1192,8 +1192,8 @@ T dynamic_cast_if_available(Message* from) { // Implementation details for {Get,Mutable}RawRepeatedPtrField. We provide // specializations for , and 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& Reflection::GetRepeatedPtrField( diff --git a/src/google/protobuf/message_lite.h b/src/google/protobuf/message_lite.h index 2e83a8a749..21d5491558 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 18b81767e7..928bbf5c0d 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 236a68b6d1..c14a896cdb 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 6bff0f0d04..f664d8e2a2 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 5d399af84f..fa86c593b3 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 3818f72156..5c6d068f12 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 5d4dae81e9..5355e1c04d 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 d34b77c545..4294f407da 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 7ff4465b77..fa1f568d7c 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