diff options
Diffstat (limited to 'src/google/protobuf/compiler')
-rw-r--r-- | src/google/protobuf/compiler/command_line_interface.h | 4 | ||||
-rw-r--r-- | src/google/protobuf/compiler/cpp/cpp_helpers.cc | 2 | ||||
-rw-r--r-- | src/google/protobuf/compiler/cpp/cpp_helpers.h | 2 | ||||
-rw-r--r-- | src/google/protobuf/compiler/cpp/cpp_message.cc | 9 | ||||
-rw-r--r-- | src/google/protobuf/compiler/cpp/cpp_message_field.cc | 2 | ||||
-rw-r--r-- | src/google/protobuf/compiler/cpp/cpp_unittest.h | 6 | ||||
-rw-r--r-- | src/google/protobuf/compiler/cpp/cpp_unittest.inc | 2 | ||||
-rw-r--r-- | src/google/protobuf/compiler/package_info.h | 2 | ||||
-rw-r--r-- | src/google/protobuf/compiler/plugin.pb.h | 8 |
9 files changed, 19 insertions, 18 deletions
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( |