浏览代码

Fix typos (#7050)

Uses https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines to find likely typos, with https://github.com/bwignall/typochecker to help automate the checking.
Brian Wignall 5 年之前
父节点
当前提交
a104dffcb6
共有 100 个文件被更改,包括 170 次插入170 次删除
  1. 2 2
      CHANGES.txt
  2. 1 1
      benchmarks/README.md
  3. 3 3
      conformance/Makefile.am
  4. 4 4
      conformance/binary_json_conformance_suite.cc
  5. 2 2
      conformance/conformance.proto
  6. 1 1
      conformance/conformance_test.h
  7. 3 3
      conformance/third_party/jsoncpp/json.h
  8. 1 1
      conformance/third_party/jsoncpp/jsoncpp.cpp
  9. 1 1
      csharp/compatibility_tests/v3.0.0/protos/src/google/protobuf/unittest_proto3.proto
  10. 1 1
      csharp/compatibility_tests/v3.0.0/test.sh
  11. 1 1
      csharp/protos/unittest.proto
  12. 1 1
      csharp/protos/unittest_custom_options_proto3.proto
  13. 1 1
      csharp/protos/unittest_proto3.proto
  14. 2 2
      csharp/src/Google.Protobuf.Conformance/Conformance.cs
  15. 1 1
      csharp/src/Google.Protobuf.Test.TestProtos/UnittestProto3.cs
  16. 1 1
      csharp/src/Google.Protobuf/ExtensionRegistry.cs
  17. 1 1
      csharp/src/Google.Protobuf/Reflection/ServiceDescriptor.cs
  18. 1 1
      examples/WORKSPACE
  19. 1 1
      java/README.md
  20. 1 1
      java/compatibility_tests/v2.5.0/more_protos/src/proto/google/protobuf/descriptor.proto
  21. 1 1
      java/compatibility_tests/v2.5.0/more_protos/src/proto/google/protobuf/unittest_custom_options.proto
  22. 1 1
      java/compatibility_tests/v2.5.0/more_protos/src/proto/google/protobuf/unittest_import.proto
  23. 1 1
      java/compatibility_tests/v2.5.0/protos/src/proto/google/protobuf/descriptor.proto
  24. 1 1
      java/compatibility_tests/v2.5.0/protos/src/proto/google/protobuf/unittest_custom_options.proto
  25. 1 1
      java/compatibility_tests/v2.5.0/protos/src/proto/google/protobuf/unittest_import.proto
  26. 1 1
      java/compatibility_tests/v2.5.0/test.sh
  27. 2 2
      java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/LiteralByteStringTest.java
  28. 1 1
      java/core/src/main/java/com/google/protobuf/ArrayDecoders.java
  29. 1 1
      java/core/src/main/java/com/google/protobuf/ExtensionSchemaLite.java
  30. 1 1
      java/core/src/main/java/com/google/protobuf/GeneratedMessage.java
  31. 3 3
      java/core/src/main/java/com/google/protobuf/GeneratedMessageV3.java
  32. 1 1
      java/core/src/main/java/com/google/protobuf/LazyFieldLite.java
  33. 1 1
      java/core/src/main/java/com/google/protobuf/SchemaUtil.java
  34. 1 1
      java/core/src/test/java/com/google/protobuf/FieldPresenceTest.java
  35. 1 1
      java/core/src/test/java/com/google/protobuf/LiteEqualsAndHashTest.java
  36. 2 2
      java/core/src/test/java/com/google/protobuf/LiteralByteStringTest.java
  37. 2 2
      java/core/src/test/java/com/google/protobuf/NioByteStringTest.java
  38. 1 1
      java/core/src/test/proto/com/google/protobuf/map_initialization_order_test.proto
  39. 1 1
      java/lite/src/test/java/com/google/protobuf/LiteTest.java
  40. 1 1
      js/binary/decoder.js
  41. 1 1
      js/binary/decoder_test.js
  42. 1 1
      js/binary/utils.js
  43. 1 1
      js/binary/utils_test.js
  44. 1 1
      js/binary/writer_test.js
  45. 3 3
      js/message.js
  46. 2 2
      kokoro/macos/prepare_build_macos_rc
  47. 2 2
      objectivec/DevTools/pddm.py
  48. 1 1
      objectivec/DevTools/pddm_tests.py
  49. 1 1
      objectivec/GPBBootstrap.h
  50. 1 1
      objectivec/GPBDictionary.m
  51. 2 2
      objectivec/GPBMessage.m
  52. 2 2
      objectivec/GPBUtilities.m
  53. 1 1
      objectivec/Tests/GPBDescriptorTests.m
  54. 15 15
      objectivec/Tests/GPBMessageTests+Merge.m
  55. 14 14
      objectivec/Tests/GPBMessageTests+Runtime.m
  56. 9 9
      objectivec/Tests/GPBMessageTests.m
  57. 1 1
      objectivec/Tests/GPBObjectiveCPlusPlusTest.mm
  58. 1 1
      objectivec/Tests/GPBSwiftTests.swift
  59. 1 1
      objectivec/Tests/unittest_extension_chain_f.proto
  60. 2 2
      php/ext/google/protobuf/array.c
  61. 2 2
      php/ext/google/protobuf/map.c
  62. 2 2
      php/ext/google/protobuf/message.c
  63. 1 1
      php/ext/google/protobuf/upb.c
  64. 2 2
      php/ext/google/protobuf/upb.h
  65. 1 1
      php/generate_descriptor_protos.sh
  66. 3 3
      php/src/Google/Protobuf/Any.php
  67. 3 3
      php/src/Google/Protobuf/Internal/CodedInputStream.php
  68. 1 1
      php/src/Google/Protobuf/Internal/GPBUtil.php
  69. 2 2
      php/src/Google/Protobuf/Internal/Message.php
  70. 1 1
      protobuf.bzl
  71. 1 1
      python/compatibility_tests/v2.5.0/protos/src/proto/google/protobuf/descriptor.proto
  72. 1 1
      python/compatibility_tests/v2.5.0/protos/src/proto/google/protobuf/unittest_custom_options.proto
  73. 1 1
      python/compatibility_tests/v2.5.0/protos/src/proto/google/protobuf/unittest_import.proto
  74. 1 1
      python/compatibility_tests/v2.5.0/test.sh
  75. 1 1
      python/compatibility_tests/v2.5.0/tests/google/protobuf/internal/generator_test.py
  76. 1 1
      python/compatibility_tests/v2.5.0/tests/google/protobuf/internal/service_reflection_test.py
  77. 1 1
      python/compatibility_tests/v2.5.0/tests/google/protobuf/internal/text_format_test.py
  78. 2 2
      python/google/protobuf/descriptor.py
  79. 2 2
      python/google/protobuf/descriptor_pool.py
  80. 1 1
      python/google/protobuf/internal/extension_dict.py
  81. 1 1
      python/google/protobuf/internal/text_format_test.py
  82. 1 1
      python/google/protobuf/internal/type_checkers.py
  83. 1 1
      python/google/protobuf/json_format.py
  84. 1 1
      python/google/protobuf/pyext/descriptor.cc
  85. 1 1
      python/google/protobuf/pyext/unknown_fields.cc
  86. 1 1
      python/mox.py
  87. 1 1
      ruby/compatibility_tests/v3.0.0/README.md
  88. 2 2
      ruby/ext/google/protobuf_c/defs.c
  89. 1 1
      ruby/ext/google/protobuf_c/upb.c
  90. 2 2
      ruby/ext/google/protobuf_c/upb.h
  91. 1 1
      ruby/src/main/java/com/google/protobuf/jruby/RubyDescriptor.java
  92. 1 1
      src/google/protobuf/compiler/annotation_test_util.h
  93. 1 1
      src/google/protobuf/compiler/code_generator.cc
  94. 1 1
      src/google/protobuf/compiler/command_line_interface.cc
  95. 2 2
      src/google/protobuf/compiler/command_line_interface.h
  96. 1 1
      src/google/protobuf/compiler/command_line_interface_unittest.cc
  97. 1 1
      src/google/protobuf/compiler/cpp/cpp_file.cc
  98. 1 1
      src/google/protobuf/compiler/cpp/cpp_file.h
  99. 1 1
      src/google/protobuf/compiler/cpp/cpp_message.cc
  100. 1 1
      src/google/protobuf/compiler/importer.h

+ 2 - 2
CHANGES.txt

@@ -265,7 +265,7 @@
   * Introduce Proto C API.
   * Introduce Proto C API.
   * FindFileContainingSymbol in descriptor pool is now able to find field and enum values.
   * FindFileContainingSymbol in descriptor pool is now able to find field and enum values.
   * reflection.MakeClass()  and  reflection.ParseMessage() are deprecated.
   * reflection.MakeClass()  and  reflection.ParseMessage() are deprecated.
-  * Added DescriptorPool.FindMethodByName() method in pure python (c extension alreay has it)
+  * Added DescriptorPool.FindMethodByName() method in pure python (c extension already has it)
   * Flipped proto3 to preserve unknown fields by default.
   * Flipped proto3 to preserve unknown fields by default.
   * Added support for memoryview in python3 proto message parsing.
   * Added support for memoryview in python3 proto message parsing.
   * Added MergeFrom for repeated scalar fields in c extension (pure python already has it)
   * Added MergeFrom for repeated scalar fields in c extension (pure python already has it)
@@ -428,7 +428,7 @@
   PHP
   PHP
   * Fixed memory leak in C-extension implementation.
   * Fixed memory leak in C-extension implementation.
   * Added discardUnknokwnFields API.
   * Added discardUnknokwnFields API.
-  * Removed duplicatd typedef in C-extension headers.
+  * Removed duplicated typedef in C-extension headers.
   * Avoided calling private php methods (timelib_update_ts).
   * Avoided calling private php methods (timelib_update_ts).
   * Fixed Any.php to use fully-qualified name for DescriptorPool.
   * Fixed Any.php to use fully-qualified name for DescriptorPool.
 
 

+ 1 - 1
benchmarks/README.md

@@ -168,7 +168,7 @@ $ ./cpp-benchmark $(specific generated dataset file name) [$(benchmark options)]
 
 
 ### Python:
 ### Python:
 
 
-For Python benchmark we have `--json` for outputing the json result
+For Python benchmark we have `--json` for outputting the json result
 
 
 #### Pure Python:
 #### Pure Python:
 
 

+ 3 - 3
conformance/Makefile.am

@@ -218,7 +218,7 @@ conformance_test_runner_SOURCES = conformance_test.h conformance_test.cc \
 nodist_conformance_test_runner_SOURCES = conformance.pb.cc google/protobuf/test_messages_proto3.pb.cc google/protobuf/test_messages_proto2.pb.cc
 nodist_conformance_test_runner_SOURCES = conformance.pb.cc google/protobuf/test_messages_proto3.pb.cc google/protobuf/test_messages_proto2.pb.cc
 conformance_test_runner_CPPFLAGS = -I$(top_srcdir)/src -I$(srcdir)
 conformance_test_runner_CPPFLAGS = -I$(top_srcdir)/src -I$(srcdir)
 conformance_test_runner_CXXFLAGS = -std=c++11
 conformance_test_runner_CXXFLAGS = -std=c++11
-# Explicit deps beacuse BUILT_SOURCES are only done before a "make all/check"
+# Explicit deps because BUILT_SOURCES are only done before a "make all/check"
 # so a direct "make test_cpp" could fail if parallel enough.
 # so a direct "make test_cpp" could fail if parallel enough.
 conformance_test_runner-conformance_test.$(OBJEXT): conformance.pb.h
 conformance_test_runner-conformance_test.$(OBJEXT): conformance.pb.h
 conformance_test_runner-conformance_test_runner.$(OBJEXT): conformance.pb.h
 conformance_test_runner-conformance_test_runner.$(OBJEXT): conformance.pb.h
@@ -227,7 +227,7 @@ conformance_cpp_LDADD = $(top_srcdir)/src/libprotobuf.la
 conformance_cpp_SOURCES = conformance_cpp.cc
 conformance_cpp_SOURCES = conformance_cpp.cc
 nodist_conformance_cpp_SOURCES = conformance.pb.cc google/protobuf/test_messages_proto3.pb.cc google/protobuf/test_messages_proto2.pb.cc
 nodist_conformance_cpp_SOURCES = conformance.pb.cc google/protobuf/test_messages_proto3.pb.cc google/protobuf/test_messages_proto2.pb.cc
 conformance_cpp_CPPFLAGS = -I$(top_srcdir)/src
 conformance_cpp_CPPFLAGS = -I$(top_srcdir)/src
-# Explicit dep beacuse BUILT_SOURCES are only done before a "make all/check"
+# Explicit dep because BUILT_SOURCES are only done before a "make all/check"
 # so a direct "make test_cpp" could fail if parallel enough.
 # so a direct "make test_cpp" could fail if parallel enough.
 conformance_cpp-conformance_cpp.$(OBJEXT): conformance.pb.h
 conformance_cpp-conformance_cpp.$(OBJEXT): conformance.pb.h
 
 
@@ -243,7 +243,7 @@ nodist_conformance_objc_SOURCES = Conformance.pbobjc.m google/protobuf/TestMessa
 # setup for Xcode and old frameworks are being found.
 # setup for Xcode and old frameworks are being found.
 conformance_objc_CPPFLAGS = -I$(top_srcdir)/objectivec -isysroot `xcrun --sdk macosx --show-sdk-path`
 conformance_objc_CPPFLAGS = -I$(top_srcdir)/objectivec -isysroot `xcrun --sdk macosx --show-sdk-path`
 conformance_objc_LDFLAGS = -framework Foundation
 conformance_objc_LDFLAGS = -framework Foundation
-# Explicit dep beacuse BUILT_SOURCES are only done before a "make all/check"
+# Explicit dep because BUILT_SOURCES are only done before a "make all/check"
 # so a direct "make test_objc" could fail if parallel enough.
 # so a direct "make test_objc" could fail if parallel enough.
 conformance_objc-conformance_objc.$(OBJEXT): Conformance.pbobjc.h google/protobuf/TestMessagesProto2.pbobjc.h google/protobuf/TestMessagesProto3.pbobjc.h
 conformance_objc-conformance_objc.$(OBJEXT): Conformance.pbobjc.h google/protobuf/TestMessagesProto2.pbobjc.h google/protobuf/TestMessagesProto3.pbobjc.h
 
 

+ 4 - 4
conformance/binary_json_conformance_suite.cc

@@ -1973,7 +1973,7 @@ void BinaryAndJsonConformanceSuite::RunJsonTestsForNonRepeatedTypes() {
   ExpectParseFailureForJson(
   ExpectParseFailureForJson(
       "Uint64FieldNotNumber", REQUIRED,
       "Uint64FieldNotNumber", REQUIRED,
       R"({"optionalUint64": "3x3"})");
       R"({"optionalUint64": "3x3"})");
-  // JSON does not allow "+" on numric values.
+  // JSON does not allow "+" on numeric values.
   ExpectParseFailureForJson(
   ExpectParseFailureForJson(
       "Int32FieldPlusSign", REQUIRED,
       "Int32FieldPlusSign", REQUIRED,
       R"({"optionalInt32": +1})");
       R"({"optionalInt32": +1})");
@@ -2080,7 +2080,7 @@ void BinaryAndJsonConformanceSuite::RunJsonTestsForNonRepeatedTypes() {
       "FloatFieldNegativeInfinity", REQUIRED,
       "FloatFieldNegativeInfinity", REQUIRED,
       R"({"optionalFloat": "-Infinity"})",
       R"({"optionalFloat": "-Infinity"})",
       "optional_float: -inf");
       "optional_float: -inf");
-  // Non-cannonical Nan will be correctly normalized.
+  // Non-canonical Nan will be correctly normalized.
   {
   {
     TestAllTypesProto3 message;
     TestAllTypesProto3 message;
     // IEEE floating-point standard 32-bit quiet NaN:
     // IEEE floating-point standard 32-bit quiet NaN:
@@ -2139,7 +2139,7 @@ void BinaryAndJsonConformanceSuite::RunJsonTestsForNonRepeatedTypes() {
       "DoubleFieldQuotedValue", REQUIRED,
       "DoubleFieldQuotedValue", REQUIRED,
       R"({"optionalDouble": "1"})",
       R"({"optionalDouble": "1"})",
       "optional_double: 1");
       "optional_double: 1");
-  // Speical values.
+  // Special values.
   RunValidJsonTest(
   RunValidJsonTest(
       "DoubleFieldNan", REQUIRED,
       "DoubleFieldNan", REQUIRED,
       R"({"optionalDouble": "NaN"})",
       R"({"optionalDouble": "NaN"})",
@@ -2152,7 +2152,7 @@ void BinaryAndJsonConformanceSuite::RunJsonTestsForNonRepeatedTypes() {
       "DoubleFieldNegativeInfinity", REQUIRED,
       "DoubleFieldNegativeInfinity", REQUIRED,
       R"({"optionalDouble": "-Infinity"})",
       R"({"optionalDouble": "-Infinity"})",
       "optional_double: -inf");
       "optional_double: -inf");
-  // Non-cannonical Nan will be correctly normalized.
+  // Non-canonical Nan will be correctly normalized.
   {
   {
     TestAllTypesProto3 message;
     TestAllTypesProto3 message;
     message.set_optional_double(
     message.set_optional_double(

+ 2 - 2
conformance/conformance.proto

@@ -113,7 +113,7 @@ message ConformanceRequest {
   string message_type = 4;
   string message_type = 4;
 
 
   // Each test is given a specific test category. Some category may need
   // Each test is given a specific test category. Some category may need
-  // spedific support in testee programs. Refer to the defintion of TestCategory
+  // spedific support in testee programs. Refer to the definition of TestCategory
   // for more information.
   // for more information.
   TestCategory test_category = 5;
   TestCategory test_category = 5;
 
 
@@ -170,7 +170,7 @@ message ConformanceResponse {
 
 
 // Encoding options for jspb format.
 // Encoding options for jspb format.
 message JspbEncodingConfig {
 message JspbEncodingConfig {
-  // Encode the value field of Any as jspb array if ture, otherwise binary.
+  // Encode the value field of Any as jspb array if true, otherwise binary.
   bool use_jspb_array_any_format = 1;
   bool use_jspb_array_any_format = 1;
 }
 }
 
 

+ 1 - 1
conformance/conformance_test.h

@@ -191,7 +191,7 @@ class ConformanceTestSuite {
   // Test cases are classified into a few categories:
   // Test cases are classified into a few categories:
   //   REQUIRED: the test case must be passed for an implementation to be
   //   REQUIRED: the test case must be passed for an implementation to be
   //             interoperable with other implementations. For example, a
   //             interoperable with other implementations. For example, a
-  //             parser implementaiton must accept both packed and unpacked
+  //             parser implementation must accept both packed and unpacked
   //             form of repeated primitive fields.
   //             form of repeated primitive fields.
   //   RECOMMENDED: the test case is not required for the implementation to
   //   RECOMMENDED: the test case is not required for the implementation to
   //                be interoperable with other implementations, but is
   //                be interoperable with other implementations, but is

+ 3 - 3
conformance/third_party/jsoncpp/json.h

@@ -1019,7 +1019,7 @@ private:
  * - ".name1.name2.name3"
  * - ".name1.name2.name3"
  * - ".[0][1][2].name1[3]"
  * - ".[0][1][2].name1[3]"
  * - ".%" => member name is provided as parameter
  * - ".%" => member name is provided as parameter
- * - ".[%]" => index is provied as parameter
+ * - ".[%]" => index is provided as parameter
  */
  */
 class JSON_API Path {
 class JSON_API Path {
 public:
 public:
@@ -1371,7 +1371,7 @@ public:
    */
    */
   std::string getFormattedErrorMessages() const;
   std::string getFormattedErrorMessages() const;
 
 
-  /** \brief Returns a vector of structured erros encounted while parsing.
+  /** \brief Returns a vector of structured errors encounted while parsing.
    * \return A (possibly empty) vector of StructuredError objects. Currently
    * \return A (possibly empty) vector of StructuredError objects. Currently
    *         only one error can be returned, but the caller should tolerate
    *         only one error can be returned, but the caller should tolerate
    * multiple
    * multiple
@@ -1816,7 +1816,7 @@ public:
  *
  *
  * The JSON document is written in a single line. It is not intended for 'human'
  * The JSON document is written in a single line. It is not intended for 'human'
  *consumption,
  *consumption,
- * but may be usefull to support feature such as RPC where bandwith is limited.
+ * but may be useful to support feature such as RPC where bandwidth is limited.
  * \sa Reader, Value
  * \sa Reader, Value
  * \deprecated Use StreamWriterBuilder.
  * \deprecated Use StreamWriterBuilder.
  */
  */

+ 1 - 1
conformance/third_party/jsoncpp/jsoncpp.cpp

@@ -4112,7 +4112,7 @@ std::string valueToString(double value, bool useSpecialFloats, unsigned int prec
   sprintf(formatString, "%%.%dg", precision);
   sprintf(formatString, "%%.%dg", precision);
 
 
   // Print into the buffer. We need not request the alternative representation
   // Print into the buffer. We need not request the alternative representation
-  // that always has a decimal point because JSON doesn't distingish the
+  // that always has a decimal point because JSON doesn't distinguish the
   // concepts of reals and integers.
   // concepts of reals and integers.
   if (isfinite(value)) {
   if (isfinite(value)) {
     len = snprintf(buffer, sizeof(buffer), formatString, value);
     len = snprintf(buffer, sizeof(buffer), formatString, value);

+ 1 - 1
csharp/compatibility_tests/v3.0.0/protos/src/google/protobuf/unittest_proto3.proto

@@ -142,7 +142,7 @@ message TestAllTypes {
   }
   }
 }
 }
 
 
-// This proto includes a recusively nested message.
+// This proto includes a recursively nested message.
 message NestedTestAllTypes {
 message NestedTestAllTypes {
   NestedTestAllTypes child = 1;
   NestedTestAllTypes child = 1;
   TestAllTypes payload = 2;
   TestAllTypes payload = 2;

+ 1 - 1
csharp/compatibility_tests/v3.0.0/test.sh

@@ -37,7 +37,7 @@ TEST_VERSION=3.0.0
 # The old version of protobuf that we are testing compatibility against. This
 # The old version of protobuf that we are testing compatibility against. This
 # is usually the same as TEST_VERSION (i.e., we use the tests extracted from
 # is usually the same as TEST_VERSION (i.e., we use the tests extracted from
 # that version to test compatibility of the newest runtime against it), but it
 # that version to test compatibility of the newest runtime against it), but it
-# is also possible to use this same test set to test the compatibiilty of the
+# is also possible to use this same test set to test the compatibility of the
 # latest version against other versions.
 # latest version against other versions.
 OLD_VERSION=$1
 OLD_VERSION=$1
 OLD_VERSION_PROTOC=http://repo1.maven.org/maven2/com/google/protobuf/protoc/$OLD_VERSION/protoc-$OLD_VERSION-linux-x86_64.exe
 OLD_VERSION_PROTOC=http://repo1.maven.org/maven2/com/google/protobuf/protoc/$OLD_VERSION/protoc-$OLD_VERSION-linux-x86_64.exe

+ 1 - 1
csharp/protos/unittest.proto

@@ -182,7 +182,7 @@ message TestAllTypes {
   }
   }
 }
 }
 
 
-// This proto includes a recusively nested message.
+// This proto includes a recursively nested message.
 message NestedTestAllTypes {
 message NestedTestAllTypes {
   optional NestedTestAllTypes child = 1;
   optional NestedTestAllTypes child = 1;
   optional TestAllTypes payload = 2;
   optional TestAllTypes payload = 2;

+ 1 - 1
csharp/protos/unittest_custom_options_proto3.proto

@@ -286,7 +286,7 @@ message Aggregate {
 }
 }
 
 
 // Allow Aggregate to be used as an option at all possible locations
 // Allow Aggregate to be used as an option at all possible locations
-// in the .proto grammer.
+// in the .proto grammar.
 extend google.protobuf.FileOptions      { Aggregate fileopt    = 15478479; }
 extend google.protobuf.FileOptions      { Aggregate fileopt    = 15478479; }
 extend google.protobuf.MessageOptions   { Aggregate msgopt     = 15480088; }
 extend google.protobuf.MessageOptions   { Aggregate msgopt     = 15480088; }
 extend google.protobuf.FieldOptions     { Aggregate fieldopt   = 15481374; }
 extend google.protobuf.FieldOptions     { Aggregate fieldopt   = 15481374; }

+ 1 - 1
csharp/protos/unittest_proto3.proto

@@ -130,7 +130,7 @@ message TestAllTypes {
   }
   }
 }
 }
 
 
-// This proto includes a recusively nested message.
+// This proto includes a recursively nested message.
 message NestedTestAllTypes {
 message NestedTestAllTypes {
   NestedTestAllTypes child = 1;
   NestedTestAllTypes child = 1;
   TestAllTypes payload = 2;
   TestAllTypes payload = 2;

+ 2 - 2
csharp/src/Google.Protobuf.Conformance/Conformance.cs

@@ -370,7 +370,7 @@ namespace Conformance {
     private global::Conformance.TestCategory testCategory_ = global::Conformance.TestCategory.UnspecifiedTest;
     private global::Conformance.TestCategory testCategory_ = global::Conformance.TestCategory.UnspecifiedTest;
     /// <summary>
     /// <summary>
     /// Each test is given a specific test category. Some category may need
     /// Each test is given a specific test category. Some category may need
-    /// spedific support in testee programs. Refer to the defintion of TestCategory
+    /// spedific support in testee programs. Refer to the definition of TestCategory
     /// for more information.
     /// for more information.
     /// </summary>
     /// </summary>
     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -1110,7 +1110,7 @@ namespace Conformance {
     public const int UseJspbArrayAnyFormatFieldNumber = 1;
     public const int UseJspbArrayAnyFormatFieldNumber = 1;
     private bool useJspbArrayAnyFormat_;
     private bool useJspbArrayAnyFormat_;
     /// <summary>
     /// <summary>
-    /// Encode the value field of Any as jspb array if ture, otherwise binary.
+    /// Encode the value field of Any as jspb array if true, otherwise binary.
     /// </summary>
     /// </summary>
     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
     public bool UseJspbArrayAnyFormat {
     public bool UseJspbArrayAnyFormat {

+ 1 - 1
csharp/src/Google.Protobuf.Test.TestProtos/UnittestProto3.cs

@@ -1773,7 +1773,7 @@ namespace Google.Protobuf.TestProtos {
   }
   }
 
 
   /// <summary>
   /// <summary>
-  /// This proto includes a recusively nested message.
+  /// This proto includes a recursively nested message.
   /// </summary>
   /// </summary>
   public sealed partial class NestedTestAllTypes : pb::IMessage<NestedTestAllTypes> {
   public sealed partial class NestedTestAllTypes : pb::IMessage<NestedTestAllTypes> {
     private static readonly pb::MessageParser<NestedTestAllTypes> _parser = new pb::MessageParser<NestedTestAllTypes>(() => new NestedTestAllTypes());
     private static readonly pb::MessageParser<NestedTestAllTypes> _parser = new pb::MessageParser<NestedTestAllTypes>(() => new NestedTestAllTypes());

+ 1 - 1
csharp/src/Google.Protobuf/ExtensionRegistry.cs

@@ -96,7 +96,7 @@ namespace Google.Protobuf
         }
         }
 
 
         /// <summary>
         /// <summary>
-        /// Adds the specified extensions to the reigstry
+        /// Adds the specified extensions to the registry
         /// </summary>
         /// </summary>
         public void AddRange(IEnumerable<Extension> extensions)
         public void AddRange(IEnumerable<Extension> extensions)
         {
         {

+ 1 - 1
csharp/src/Google.Protobuf/Reflection/ServiceDescriptor.cs

@@ -85,7 +85,7 @@ namespace Google.Protobuf.Reflection
         /// Finds a method by name.
         /// Finds a method by name.
         /// </summary>
         /// </summary>
         /// <param name="name">The unqualified name of the method (e.g. "Foo").</param>
         /// <param name="name">The unqualified name of the method (e.g. "Foo").</param>
-        /// <returns>The method's decsriptor, or null if not found.</returns>
+        /// <returns>The method's descriptor, or null if not found.</returns>
         public MethodDescriptor FindMethodByName(String name)
         public MethodDescriptor FindMethodByName(String name)
         {
         {
             return File.DescriptorPool.FindSymbol<MethodDescriptor>(FullName + "." + name);
             return File.DescriptorPool.FindSymbol<MethodDescriptor>(FullName + "." + name);

+ 1 - 1
examples/WORKSPACE

@@ -19,7 +19,7 @@ local_repository(
 )
 )
 
 
 # Similar to com_google_protobuf but for Java lite. If you are building
 # Similar to com_google_protobuf but for Java lite. If you are building
-# for Android, the lite version should be prefered because it has a much
+# for Android, the lite version should be preferred because it has a much
 # smaller code size.
 # smaller code size.
 local_repository(
 local_repository(
     name = "com_google_protobuf_javalite",
     name = "com_google_protobuf_javalite",

+ 1 - 1
java/README.md

@@ -146,7 +146,7 @@ library (without the util package).
   are guaranteed for minor version releases if the user follows the guideline
   are guaranteed for minor version releases if the user follows the guideline
   described in this section.
   described in this section.
 
 
-* Protobuf major version releases may also be backwards-compatbile with the
+* Protobuf major version releases may also be backwards-compatible with the
   last release of the previous major version. See the release notice for more
   last release of the previous major version. See the release notice for more
   details.
   details.
 
 

+ 1 - 1
java/compatibility_tests/v2.5.0/more_protos/src/proto/google/protobuf/descriptor.proto

@@ -228,7 +228,7 @@ message MethodDescriptorProto {
 // * For options which will be published and used publicly by multiple
 // * For options which will be published and used publicly by multiple
 //   independent entities, e-mail protobuf-global-extension-registry@google.com
 //   independent entities, e-mail protobuf-global-extension-registry@google.com
 //   to reserve extension numbers. Simply provide your project name (e.g.
 //   to reserve extension numbers. Simply provide your project name (e.g.
-//   Object-C plugin) and your porject website (if available) -- there's no need
+//   Object-C plugin) and your project website (if available) -- there's no need
 //   to explain how you intend to use them. Usually you only need one extension
 //   to explain how you intend to use them. Usually you only need one extension
 //   number. You can declare multiple options with only one extension number by
 //   number. You can declare multiple options with only one extension number by
 //   putting them in a sub-message. See the Custom Options section of the docs
 //   putting them in a sub-message. See the Custom Options section of the docs

+ 1 - 1
java/compatibility_tests/v2.5.0/more_protos/src/proto/google/protobuf/unittest_custom_options.proto

@@ -321,7 +321,7 @@ message Aggregate {
 }
 }
 
 
 // Allow Aggregate to be used as an option at all possible locations
 // Allow Aggregate to be used as an option at all possible locations
-// in the .proto grammer.
+// in the .proto grammar.
 extend google.protobuf.FileOptions      { optional Aggregate fileopt    = 15478479; }
 extend google.protobuf.FileOptions      { optional Aggregate fileopt    = 15478479; }
 extend google.protobuf.MessageOptions   { optional Aggregate msgopt     = 15480088; }
 extend google.protobuf.MessageOptions   { optional Aggregate msgopt     = 15480088; }
 extend google.protobuf.FieldOptions     { optional Aggregate fieldopt   = 15481374; }
 extend google.protobuf.FieldOptions     { optional Aggregate fieldopt   = 15481374; }

+ 1 - 1
java/compatibility_tests/v2.5.0/more_protos/src/proto/google/protobuf/unittest_import.proto

@@ -43,7 +43,7 @@ package protobuf_unittest_import;
 
 
 option optimize_for = SPEED;
 option optimize_for = SPEED;
 
 
-// Excercise the java_package option.
+// Exercise the java_package option.
 option java_package = "com.google.protobuf.test";
 option java_package = "com.google.protobuf.test";
 
 
 // Do not set a java_outer_classname here to verify that Proto2 works without
 // Do not set a java_outer_classname here to verify that Proto2 works without

+ 1 - 1
java/compatibility_tests/v2.5.0/protos/src/proto/google/protobuf/descriptor.proto

@@ -228,7 +228,7 @@ message MethodDescriptorProto {
 // * For options which will be published and used publicly by multiple
 // * For options which will be published and used publicly by multiple
 //   independent entities, e-mail protobuf-global-extension-registry@google.com
 //   independent entities, e-mail protobuf-global-extension-registry@google.com
 //   to reserve extension numbers. Simply provide your project name (e.g.
 //   to reserve extension numbers. Simply provide your project name (e.g.
-//   Object-C plugin) and your porject website (if available) -- there's no need
+//   Object-C plugin) and your project website (if available) -- there's no need
 //   to explain how you intend to use them. Usually you only need one extension
 //   to explain how you intend to use them. Usually you only need one extension
 //   number. You can declare multiple options with only one extension number by
 //   number. You can declare multiple options with only one extension number by
 //   putting them in a sub-message. See the Custom Options section of the docs
 //   putting them in a sub-message. See the Custom Options section of the docs

+ 1 - 1
java/compatibility_tests/v2.5.0/protos/src/proto/google/protobuf/unittest_custom_options.proto

@@ -321,7 +321,7 @@ message Aggregate {
 }
 }
 
 
 // Allow Aggregate to be used as an option at all possible locations
 // Allow Aggregate to be used as an option at all possible locations
-// in the .proto grammer.
+// in the .proto grammar.
 extend google.protobuf.FileOptions      { optional Aggregate fileopt    = 15478479; }
 extend google.protobuf.FileOptions      { optional Aggregate fileopt    = 15478479; }
 extend google.protobuf.MessageOptions   { optional Aggregate msgopt     = 15480088; }
 extend google.protobuf.MessageOptions   { optional Aggregate msgopt     = 15480088; }
 extend google.protobuf.FieldOptions     { optional Aggregate fieldopt   = 15481374; }
 extend google.protobuf.FieldOptions     { optional Aggregate fieldopt   = 15481374; }

+ 1 - 1
java/compatibility_tests/v2.5.0/protos/src/proto/google/protobuf/unittest_import.proto

@@ -43,7 +43,7 @@ package protobuf_unittest_import;
 
 
 option optimize_for = SPEED;
 option optimize_for = SPEED;
 
 
-// Excercise the java_package option.
+// Exercise the java_package option.
 option java_package = "com.google.protobuf.test";
 option java_package = "com.google.protobuf.test";
 
 
 // Do not set a java_outer_classname here to verify that Proto2 works without
 // Do not set a java_outer_classname here to verify that Proto2 works without

+ 1 - 1
java/compatibility_tests/v2.5.0/test.sh

@@ -15,7 +15,7 @@ TEST_VERSION=`grep "^  <version>.*</version>" pom.xml | sed "s|  <version>\(.*\)
 # The old version of protobuf that we are testing compatibility against. This
 # The old version of protobuf that we are testing compatibility against. This
 # is usually the same as TEST_VERSION (i.e., we use the tests extracted from
 # is usually the same as TEST_VERSION (i.e., we use the tests extracted from
 # that version to test compatibility of the newest runtime against it), but it
 # that version to test compatibility of the newest runtime against it), but it
-# is also possible to use this same test set to test the compatibiilty of the
+# is also possible to use this same test set to test the compatibility of the
 # latest version against other versions.
 # latest version against other versions.
 OLD_VERSION=$1
 OLD_VERSION=$1
 OLD_VERSION_PROTOC=https://repo1.maven.org/maven2/com/google/protobuf/protoc/$OLD_VERSION/protoc-$OLD_VERSION-linux-x86_64.exe
 OLD_VERSION_PROTOC=https://repo1.maven.org/maven2/com/google/protobuf/protoc/$OLD_VERSION/protoc-$OLD_VERSION-linux-x86_64.exe

+ 2 - 2
java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/LiteralByteStringTest.java

@@ -87,7 +87,7 @@ public class LiteralByteStringTest extends TestCase {
       stillEqual = (iter.hasNext() && referenceBytes[i] == iter.nextByte());
       stillEqual = (iter.hasNext() && referenceBytes[i] == iter.nextByte());
     }
     }
     assertTrue(classUnderTest + " must capture the right bytes", stillEqual);
     assertTrue(classUnderTest + " must capture the right bytes", stillEqual);
-    assertFalse(classUnderTest + " must have exhausted the itertor", iter.hasNext());
+    assertFalse(classUnderTest + " must have exhausted the iterator", iter.hasNext());
 
 
     try {
     try {
       iter.nextByte();
       iter.nextByte();
@@ -317,7 +317,7 @@ public class LiteralByteStringTest extends TestCase {
     assertEquals("InputStream.skip(), no more input", 0, input.available());
     assertEquals("InputStream.skip(), no more input", 0, input.available());
     assertEquals("InputStream.skip(), no more input", -1, input.read());
     assertEquals("InputStream.skip(), no more input", -1, input.read());
     input.reset();
     input.reset();
-    assertEquals("InputStream.reset() succeded",
+    assertEquals("InputStream.reset() succeeded",
                  stringSize - skipped1, input.available());
                  stringSize - skipped1, input.available());
     assertEquals("InputStream.reset(), read()",
     assertEquals("InputStream.reset(), read()",
         stringUnderTest.byteAt(nearEndIndex) & 0xFF, input.read());
         stringUnderTest.byteAt(nearEndIndex) & 0xFF, input.read());

+ 1 - 1
java/core/src/main/java/com/google/protobuf/ArrayDecoders.java

@@ -873,7 +873,7 @@ final class ArrayDecoders {
       }
       }
     } else {
     } else {
       Object value = null;
       Object value = null;
-      // Enum is a special case becasue unknown enum values will be put into UnknownFieldSetLite.
+      // Enum is a special case because unknown enum values will be put into UnknownFieldSetLite.
       if (extension.getLiteType() == WireFormat.FieldType.ENUM) {
       if (extension.getLiteType() == WireFormat.FieldType.ENUM) {
         position = decodeVarint32(data, position, registers);
         position = decodeVarint32(data, position, registers);
         Object enumValue = extension.descriptor.getEnumType().findValueByNumber(registers.int1);
         Object enumValue = extension.descriptor.getEnumType().findValueByNumber(registers.int1);

+ 1 - 1
java/core/src/main/java/com/google/protobuf/ExtensionSchemaLite.java

@@ -193,7 +193,7 @@ final class ExtensionSchemaLite extends ExtensionSchema<ExtensionDescriptor> {
       extensions.setField(extension.descriptor, value);
       extensions.setField(extension.descriptor, value);
     } else {
     } else {
       Object value = null;
       Object value = null;
-      // Enum is a special case becasue unknown enum values will be put into UnknownFieldSetLite.
+      // Enum is a special case because unknown enum values will be put into UnknownFieldSetLite.
       if (extension.getLiteType() == WireFormat.FieldType.ENUM) {
       if (extension.getLiteType() == WireFormat.FieldType.ENUM) {
         int number = reader.readInt32();
         int number = reader.readInt32();
         Object enumValue = extension.descriptor.getEnumType().findValueByNumber(number);
         Object enumValue = extension.descriptor.getEnumType().findValueByNumber(number);

+ 1 - 1
java/core/src/main/java/com/google/protobuf/GeneratedMessage.java

@@ -359,7 +359,7 @@ public abstract class GeneratedMessage extends AbstractMessage
    * TODO(xiaofeng): remove this after b/29368482 is fixed. We need to move this
    * TODO(xiaofeng): remove this after b/29368482 is fixed. We need to move this
    * interface to AbstractMessage in order to versioning GeneratedMessage but
    * interface to AbstractMessage in order to versioning GeneratedMessage but
    * this move breaks binary compatibility for AppEngine. After AppEngine is
    * this move breaks binary compatibility for AppEngine. After AppEngine is
-   * fixed we can exlude this from google3.
+   * fixed we can exclude this from google3.
    */
    */
   protected interface BuilderParent extends AbstractMessage.BuilderParent {}
   protected interface BuilderParent extends AbstractMessage.BuilderParent {}
 
 

+ 3 - 3
java/core/src/main/java/com/google/protobuf/GeneratedMessageV3.java

@@ -515,7 +515,7 @@ public abstract class GeneratedMessageV3 extends AbstractMessage
    * TODO(xiaofeng): remove this after b/29368482 is fixed. We need to move this
    * TODO(xiaofeng): remove this after b/29368482 is fixed. We need to move this
    * interface to AbstractMessage in order to versioning GeneratedMessageV3 but
    * interface to AbstractMessage in order to versioning GeneratedMessageV3 but
    * this move breaks binary compatibility for AppEngine. After AppEngine is
    * this move breaks binary compatibility for AppEngine. After AppEngine is
-   * fixed we can exlude this from google3.
+   * fixed we can exclude this from google3.
    */
    */
   protected interface BuilderParent extends AbstractMessage.BuilderParent {}
   protected interface BuilderParent extends AbstractMessage.BuilderParent {}
 
 
@@ -3086,7 +3086,7 @@ public abstract class GeneratedMessageV3 extends AbstractMessage
       serializeMapTo(out, m, defaultEntry, fieldNumber);
       serializeMapTo(out, m, defaultEntry, fieldNumber);
       return;
       return;
     }
     }
-    // Sorting the unboxed keys and then look up the values during serialziation is 2x faster
+    // Sorting the unboxed keys and then look up the values during serialization is 2x faster
     // than sorting map entries with a custom comparator directly.
     // than sorting map entries with a custom comparator directly.
     int[] keys = new int[m.size()];
     int[] keys = new int[m.size()];
     int index = 0;
     int index = 0;
@@ -3142,7 +3142,7 @@ public abstract class GeneratedMessageV3 extends AbstractMessage
       return;
       return;
     }
     }
 
 
-    // Sorting the String keys and then look up the values during serialziation is 25% faster than
+    // Sorting the String keys and then look up the values during serialization is 25% faster than
     // sorting map entries with a custom comparator directly.
     // sorting map entries with a custom comparator directly.
     String[] keys = new String[m.size()];
     String[] keys = new String[m.size()];
     keys = m.keySet().toArray(keys);
     keys = m.keySet().toArray(keys);

+ 1 - 1
java/core/src/main/java/com/google/protobuf/LazyFieldLite.java

@@ -274,7 +274,7 @@ public class LazyFieldLite {
 
 
     // At least one is parsed and both contain data. We won't drop any extensions here directly, but
     // At least one is parsed and both contain data. We won't drop any extensions here directly, but
     // in the case that the extension registries are not the same then we might in the future if we
     // in the case that the extension registries are not the same then we might in the future if we
-    // need to serialze and parse a message again.
+    // need to serialize and parse a message again.
     if (this.value == null && other.value != null) {
     if (this.value == null && other.value != null) {
       setValue(mergeValueAndBytes(other.value, this.delayedBytes, this.extensionRegistry));
       setValue(mergeValueAndBytes(other.value, this.delayedBytes, this.extensionRegistry));
       return;
       return;

+ 1 - 1
java/core/src/main/java/com/google/protobuf/SchemaUtil.java

@@ -767,7 +767,7 @@ final class SchemaUtil {
    * logic in the JDK</a>.
    * logic in the JDK</a>.
    *
    *
    * @param lo the lowest fieldNumber contained within the message.
    * @param lo the lowest fieldNumber contained within the message.
-   * @param hi the higest fieldNumber contained within the message.
+   * @param hi the highest fieldNumber contained within the message.
    * @param numFields the total number of fields in the message.
    * @param numFields the total number of fields in the message.
    * @return {@code true} if tableswitch should be used, rather than lookupswitch.
    * @return {@code true} if tableswitch should be used, rather than lookupswitch.
    */
    */

+ 1 - 1
java/core/src/test/java/com/google/protobuf/FieldPresenceTest.java

@@ -103,7 +103,7 @@ public class FieldPresenceTest extends TestCase {
   public void testOneofEquals() throws Exception {
   public void testOneofEquals() throws Exception {
     TestAllTypes.Builder builder = TestAllTypes.newBuilder();
     TestAllTypes.Builder builder = TestAllTypes.newBuilder();
     TestAllTypes message1 = builder.build();
     TestAllTypes message1 = builder.build();
-    // Set message2's oneof_uint32 field to defalut value. The two
+    // Set message2's oneof_uint32 field to default value. The two
     // messages should be different when check with oneof case.
     // messages should be different when check with oneof case.
     builder.setOneofUint32(0);
     builder.setOneofUint32(0);
     TestAllTypes message2 = builder.build();
     TestAllTypes message2 = builder.build();

+ 1 - 1
java/core/src/test/java/com/google/protobuf/LiteEqualsAndHashTest.java

@@ -75,7 +75,7 @@ public class LiteEqualsAndHashTest extends TestCase {
     assertEquals(foo1a, foo1b);
     assertEquals(foo1a, foo1b);
     assertEquals(foo1a.hashCode(), foo1b.hashCode());
     assertEquals(foo1a.hashCode(), foo1b.hashCode());
 
 
-    // Check that a diffeent object is not equal.
+    // Check that a different object is not equal.
     assertFalse(foo1a.equals(foo2));
     assertFalse(foo1a.equals(foo2));
 
 
     // Check that two objects which have different types but the same field values are not
     // Check that two objects which have different types but the same field values are not

+ 2 - 2
java/core/src/test/java/com/google/protobuf/LiteralByteStringTest.java

@@ -94,7 +94,7 @@ public class LiteralByteStringTest extends TestCase {
       stillEqual = (iter.hasNext() && referenceBytes[i] == iter.nextByte());
       stillEqual = (iter.hasNext() && referenceBytes[i] == iter.nextByte());
     }
     }
     assertTrue(classUnderTest + " must capture the right bytes", stillEqual);
     assertTrue(classUnderTest + " must capture the right bytes", stillEqual);
-    assertFalse(classUnderTest + " must have exhausted the itertor", iter.hasNext());
+    assertFalse(classUnderTest + " must have exhausted the iterator", iter.hasNext());
 
 
     try {
     try {
       iter.nextByte();
       iter.nextByte();
@@ -536,7 +536,7 @@ public class LiteralByteStringTest extends TestCase {
     assertThat(input.read(new byte[1], /* off= */ 0, /*len=*/ 0)).isEqualTo(-1);
     assertThat(input.read(new byte[1], /* off= */ 0, /*len=*/ 0)).isEqualTo(-1);
 
 
     input.reset();
     input.reset();
-    assertEquals("InputStream.reset() succeded", stringSize - skipped1, input.available());
+    assertEquals("InputStream.reset() succeeded", stringSize - skipped1, input.available());
     assertEquals(
     assertEquals(
         "InputStream.reset(), read()", stringUnderTest.byteAt(nearEndIndex) & 0xFF, input.read());
         "InputStream.reset(), read()", stringUnderTest.byteAt(nearEndIndex) & 0xFF, input.read());
   }
   }

+ 2 - 2
java/core/src/test/java/com/google/protobuf/NioByteStringTest.java

@@ -84,7 +84,7 @@ public class NioByteStringTest extends TestCase {
       stillEqual = (iter.hasNext() && BYTES[i] == iter.nextByte());
       stillEqual = (iter.hasNext() && BYTES[i] == iter.nextByte());
     }
     }
     assertTrue(CLASSNAME + " must capture the right bytes", stillEqual);
     assertTrue(CLASSNAME + " must capture the right bytes", stillEqual);
-    assertFalse(CLASSNAME + " must have exhausted the itertor", iter.hasNext());
+    assertFalse(CLASSNAME + " must have exhausted the iterator", iter.hasNext());
 
 
     try {
     try {
       iter.nextByte();
       iter.nextByte();
@@ -590,7 +590,7 @@ public class NioByteStringTest extends TestCase {
     assertEquals("InputStream.skip(), no more input", 0, input.available());
     assertEquals("InputStream.skip(), no more input", 0, input.available());
     assertEquals("InputStream.skip(), no more input", -1, input.read());
     assertEquals("InputStream.skip(), no more input", -1, input.read());
     input.reset();
     input.reset();
-    assertEquals("InputStream.reset() succeded", stringSize - skipped1, input.available());
+    assertEquals("InputStream.reset() succeeded", stringSize - skipped1, input.available());
     assertEquals(
     assertEquals(
         "InputStream.reset(), read()", testString.byteAt(nearEndIndex) & 0xFF, input.read());
         "InputStream.reset(), read()", testString.byteAt(nearEndIndex) & 0xFF, input.read());
   }
   }

+ 1 - 1
java/core/src/test/proto/com/google/protobuf/map_initialization_order_test.proto

@@ -28,7 +28,7 @@
 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
-// Regression test for a map initilaization order bug. The bug only manifests
+// Regression test for a map initialization order bug. The bug only manifests
 // when:
 // when:
 //   1. A message contains map fields and is also extendable.
 //   1. A message contains map fields and is also extendable.
 //   2. There is a file-level extension defined in the same file referencing
 //   2. There is a file-level extension defined in the same file referencing

+ 1 - 1
java/lite/src/test/java/com/google/protobuf/LiteTest.java

@@ -1997,7 +1997,7 @@ public class LiteTest extends TestCase {
     assertEquals(foo1a, foo1b);
     assertEquals(foo1a, foo1b);
     assertEquals(foo1a.hashCode(), foo1b.hashCode());
     assertEquals(foo1a.hashCode(), foo1b.hashCode());
 
 
-    // Check that a diffeent object is not equal.
+    // Check that a different object is not equal.
     assertFalse(foo1a.equals(foo2));
     assertFalse(foo1a.equals(foo2));
 
 
     // Check that two objects which have different types but the same field values are not
     // Check that two objects which have different types but the same field values are not

+ 1 - 1
js/binary/decoder.js

@@ -748,7 +748,7 @@ jspb.BinaryDecoder.prototype.readInt32 = function() {
 /**
 /**
  * Reads a raw signed 64-bit integer from the binary stream. Note that since
  * Reads a raw signed 64-bit integer from the binary stream. Note that since
  * Javascript represents all numbers as double-precision floats, there will be
  * Javascript represents all numbers as double-precision floats, there will be
- * precision lost if the absolute vlaue of the integer is larger than 2^53.
+ * precision lost if the absolute value of the integer is larger than 2^53.
  *
  *
  * @return {number} The signed 64-bit integer read from the binary stream.
  * @return {number} The signed 64-bit integer read from the binary stream.
  *     Precision will be lost if the integer exceeds 2^53.
  *     Precision will be lost if the integer exceeds 2^53.

+ 1 - 1
js/binary/decoder_test.js

@@ -303,7 +303,7 @@ describe('binaryDecoderTest', function() {
     });
     });
 
 
     it('does zigzag encoding properly', function() {
     it('does zigzag encoding properly', function() {
-      // Test cases direcly from the protobuf dev guide.
+      // Test cases directly from the protobuf dev guide.
       // https://engdoc.corp.google.com/eng/howto/protocolbuffers/developerguide/encoding.shtml?cl=head#types
       // https://engdoc.corp.google.com/eng/howto/protocolbuffers/developerguide/encoding.shtml?cl=head#types
       var testCases = [
       var testCases = [
         {original: '0', zigzag: '0'},
         {original: '0', zigzag: '0'},

+ 1 - 1
js/binary/utils.js

@@ -117,7 +117,7 @@ jspb.utils.splitInt64 = function(value) {
 
 
 
 
 /**
 /**
- * Convers a signed Javascript integer into zigzag format, splits it into two
+ * Converts a signed Javascript integer into zigzag format, splits it into two
  * 32-bit halves, and stores it in the temp values above.
  * 32-bit halves, and stores it in the temp values above.
  * @param {number} value The number to split.
  * @param {number} value The number to split.
  */
  */

+ 1 - 1
js/binary/utils_test.js

@@ -506,7 +506,7 @@ describe('binaryUtilsTest', function() {
     function makeHiLoPair(lo, hi) {
     function makeHiLoPair(lo, hi) {
       return {lo: lo >>> 0, hi: hi >>> 0};
       return {lo: lo >>> 0, hi: hi >>> 0};
     }
     }
-    // Test cases direcly from the protobuf dev guide.
+    // Test cases directly from the protobuf dev guide.
     // https://engdoc.corp.google.com/eng/howto/protocolbuffers/developerguide/encoding.shtml?cl=head#types
     // https://engdoc.corp.google.com/eng/howto/protocolbuffers/developerguide/encoding.shtml?cl=head#types
     var testCases = [
     var testCases = [
       {original: stringToHiLoPair('0'), zigzag: stringToHiLoPair('0')},
       {original: stringToHiLoPair('0'), zigzag: stringToHiLoPair('0')},

+ 1 - 1
js/binary/writer_test.js

@@ -210,7 +210,7 @@ describe('binaryWriterTest', function() {
   });
   });
 
 
   it('writes zigzag 64 fields', function() {
   it('writes zigzag 64 fields', function() {
-    // Test cases direcly from the protobuf dev guide.
+    // Test cases directly from the protobuf dev guide.
     // https://engdoc.corp.google.com/eng/howto/protocolbuffers/developerguide/encoding.shtml?cl=head#types
     // https://engdoc.corp.google.com/eng/howto/protocolbuffers/developerguide/encoding.shtml?cl=head#types
     var testCases = [
     var testCases = [
       {original: '0', zigzag: '0'},
       {original: '0', zigzag: '0'},

+ 3 - 3
js/message.js

@@ -317,7 +317,7 @@ jspb.Message.getIndex_ = function(msg, fieldNumber) {
   return fieldNumber + msg.arrayIndexOffset_;
   return fieldNumber + msg.arrayIndexOffset_;
 };
 };
 
 
-// This is only here to ensure we are not back sliding on ES6 requiements for
+// This is only here to ensure we are not back sliding on ES6 requirements for
 // protos in g3.
 // protos in g3.
 jspb.Message.hiddenES6Property_ = class {};
 jspb.Message.hiddenES6Property_ = class {};
 
 
@@ -366,7 +366,7 @@ jspb.Message.initialize = function(
 
 
   if (!jspb.Message.SERIALIZE_EMPTY_TRAILING_FIELDS) {
   if (!jspb.Message.SERIALIZE_EMPTY_TRAILING_FIELDS) {
     // TODO(jakubvrana): This is same for all instances, move to prototype.
     // TODO(jakubvrana): This is same for all instances, move to prototype.
-    // TODO(jakubvrana): There are indexOf calls on this in serializtion,
+    // TODO(jakubvrana): There are indexOf calls on this in serialization,
     // consider switching to a set.
     // consider switching to a set.
     msg.repeatedFields = repeatedFields;
     msg.repeatedFields = repeatedFields;
   }
   }
@@ -1860,7 +1860,7 @@ jspb.Message.clone_ = function(obj) {
  * @param {Function} constructor The message constructor.
  * @param {Function} constructor The message constructor.
  */
  */
 jspb.Message.registerMessageType = function(id, constructor) {
 jspb.Message.registerMessageType = function(id, constructor) {
-  // This is needed so we can later access messageId directly on the contructor,
+  // This is needed so we can later access messageId directly on the constructor,
   // otherwise it is not available due to 'property collapsing' by the compiler.
   // otherwise it is not available due to 'property collapsing' by the compiler.
   /**
   /**
    * @suppress {strictMissingProperties} messageId is not defined on Function
    * @suppress {strictMissingProperties} messageId is not defined on Function

+ 2 - 2
kokoro/macos/prepare_build_macos_rc

@@ -5,8 +5,8 @@
 ##
 ##
 # Select Xcode version
 # Select Xcode version
 
 
-# Remember to udpate the Xcode version when Xcode_11.0.app is not available.
-# If xcode is not available, it will probaly encounter the failure for
+# Remember to update the Xcode version when Xcode_11.0.app is not available.
+# If xcode is not available, it will probably encounter the failure for
 # "autom4te: need GNU m4 1.4 or later: /usr/bin/m4"
 # "autom4te: need GNU m4 1.4 or later: /usr/bin/m4"
 # go/kokoro/userdocs/macos/selecting_xcode.md for more information.
 # go/kokoro/userdocs/macos/selecting_xcode.md for more information.
 export DEVELOPER_DIR=/Applications/Xcode_11.0.app/Contents/Developer
 export DEVELOPER_DIR=/Applications/Xcode_11.0.app/Contents/Developer

+ 2 - 2
objectivec/DevTools/pddm.py

@@ -288,7 +288,7 @@ class MacroCollection(object):
     name = macro_ref_match.group('name')
     name = macro_ref_match.group('name')
     for prev_name, prev_macro_ref in macro_stack:
     for prev_name, prev_macro_ref in macro_stack:
       if name == prev_name:
       if name == prev_name:
-        raise PDDMError('Found macro recusion, invoking "%s":%s' %
+        raise PDDMError('Found macro recursion, invoking "%s":%s' %
                         (macro_ref_str, self._FormatStack(macro_stack)))
                         (macro_ref_str, self._FormatStack(macro_stack)))
     macro = self._macros[name]
     macro = self._macros[name]
     args_str = macro_ref_match.group('args').strip()
     args_str = macro_ref_match.group('args').strip()
@@ -395,7 +395,7 @@ class SourceFile(object):
         wasn't append.  If SUCCESS is True, then CAN_ADD_MORE is True/False to
         wasn't append.  If SUCCESS is True, then CAN_ADD_MORE is True/False to
         indicate if more lines can be added after this one.
         indicate if more lines can be added after this one.
       """
       """
-      assert False, "sublcass should have overridden"
+      assert False, "subclass should have overridden"
       return (False, False)
       return (False, False)
 
 
     def HitEOF(self):
     def HitEOF(self):

+ 1 - 1
objectivec/DevTools/pddm_tests.py

@@ -314,7 +314,7 @@ foo(x, y)
       self.fail('Should throw exception! Test failed to catch recursion.')
       self.fail('Should throw exception! Test failed to catch recursion.')
     except pddm.PDDMError as e:
     except pddm.PDDMError as e:
       self.assertEqual(e.message,
       self.assertEqual(e.message,
-                       'Found macro recusion, invoking "foo(1, A)":\n...while expanding "bar(1, A)".\n...while expanding "foo(A,B)".')
+                       'Found macro recursion, invoking "foo(1, A)":\n...while expanding "bar(1, A)".\n...while expanding "foo(A,B)".')
 
 
 
 
 class TestParsingSource(unittest.TestCase):
 class TestParsingSource(unittest.TestCase):

+ 1 - 1
objectivec/GPBBootstrap.h

@@ -46,7 +46,7 @@
 #endif
 #endif
 
 
 // If the headers are imported into Objective-C++, we can run into an issue
 // If the headers are imported into Objective-C++, we can run into an issue
-// where the defintion of NS_ENUM (really CF_ENUM) changes based on the C++
+// where the definition of NS_ENUM (really CF_ENUM) changes based on the C++
 // standard that is in effect.  If it isn't C++11 or higher, the definition
 // standard that is in effect.  If it isn't C++11 or higher, the definition
 // doesn't allow us to forward declare. We work around this one case by
 // doesn't allow us to forward declare. We work around this one case by
 // providing a local definition. The default case has to use NS_ENUM for the
 // providing a local definition. The default case has to use NS_ENUM for the

+ 1 - 1
objectivec/GPBDictionary.m

@@ -508,7 +508,7 @@ void GPBDictionaryReadEntry(id mapDictionary,
 #if defined(__clang_analyzer__)
 #if defined(__clang_analyzer__)
         case GPBDataTypeGroup:
         case GPBDataTypeGroup:
           // Maps can't really have Groups as the value type, but this case is needed
           // Maps can't really have Groups as the value type, but this case is needed
-          // so the analyzer won't report the posibility of send nil in for the value
+          // so the analyzer won't report the possibility of send nil in for the value
           // in the NSMutableDictionary case below.
           // in the NSMutableDictionary case below.
 #endif
 #endif
         case GPBDataTypeMessage: {
         case GPBDataTypeMessage: {

+ 2 - 2
objectivec/GPBMessage.m

@@ -564,7 +564,7 @@ static id CreateMapForField(GPBFieldDescriptor *field,
 // so use of the array/map after the call returns is flagged as a use after
 // so use of the array/map after the call returns is flagged as a use after
 // free.
 // free.
 // But GPBSetRetainedObjectIvarWithFieldInternal() is "consuming" the retain
 // But GPBSetRetainedObjectIvarWithFieldInternal() is "consuming" the retain
-// count be holding onto the object (it is transfering it), the object is
+// count be holding onto the object (it is transferring it), the object is
 // still valid after returning from the call.  The other way to avoid this
 // still valid after returning from the call.  The other way to avoid this
 // would be to add a -retain/-autorelease, but that would force every
 // would be to add a -retain/-autorelease, but that would force every
 // repeated/map field parsed into the autorelease pool which is both a memory
 // repeated/map field parsed into the autorelease pool which is both a memory
@@ -2518,7 +2518,7 @@ static void MergeRepeatedNotPackedFieldFromCodedInputStream(
               GetOrCreateArrayIvarWithField(self, field, syntax);
               GetOrCreateArrayIvarWithField(self, field, syntax);
           [resultArray addRawValuesFromArray:otherArray];
           [resultArray addRawValuesFromArray:otherArray];
         } else {
         } else {
-          // The array type doesn't matter, that all implment
+          // The array type doesn't matter, that all implement
           // -addValuesFromArray:.
           // -addValuesFromArray:.
           GPBInt32Array *resultArray =
           GPBInt32Array *resultArray =
               GetOrCreateArrayIvarWithField(self, field, syntax);
               GetOrCreateArrayIvarWithField(self, field, syntax);

+ 2 - 2
objectivec/GPBUtilities.m

@@ -504,7 +504,7 @@ void GPBClearAutocreatedMessageIvarWithField(GPBMessage *self,
   [oldValue release];
   [oldValue release];
 }
 }
 
 
-// This exists only for briging some aliased types, nothing else should use it.
+// This exists only for bridging some aliased types, nothing else should use it.
 static void GPBSetObjectIvarWithField(GPBMessage *self,
 static void GPBSetObjectIvarWithField(GPBMessage *self,
                                       GPBFieldDescriptor *field, id value) {
                                       GPBFieldDescriptor *field, id value) {
   if (self == nil || field == nil) return;
   if (self == nil || field == nil) return;
@@ -521,7 +521,7 @@ static void GPBSetCopyObjectIvarWithField(GPBMessage *self,
 // is marked as consuming the value. Note: For some reason this doesn't happen
 // is marked as consuming the value. Note: For some reason this doesn't happen
 // with the -retain in GPBSetObjectIvarWithField.
 // with the -retain in GPBSetObjectIvarWithField.
 #if !defined(__clang_analyzer__)
 #if !defined(__clang_analyzer__)
-// This exists only for briging some aliased types, nothing else should use it.
+// This exists only for bridging some aliased types, nothing else should use it.
 static void GPBSetCopyObjectIvarWithField(GPBMessage *self,
 static void GPBSetCopyObjectIvarWithField(GPBMessage *self,
                                           GPBFieldDescriptor *field, id value) {
                                           GPBFieldDescriptor *field, id value) {
   if (self == nil || field == nil) return;
   if (self == nil || field == nil) return;

+ 1 - 1
objectivec/Tests/GPBDescriptorTests.m

@@ -355,7 +355,7 @@
   XCTAssertNil([oneofBar fieldWithNumber:TestOneof2_FieldNumber_FooString]);
   XCTAssertNil([oneofBar fieldWithNumber:TestOneof2_FieldNumber_FooString]);
 
 
   // Check pointers back to the enclosing oneofs.
   // Check pointers back to the enclosing oneofs.
-  // (pointer comparisions)
+  // (pointer comparisons)
   XCTAssertEqual(fooStringField.containingOneof, oneofFoo);
   XCTAssertEqual(fooStringField.containingOneof, oneofFoo);
   XCTAssertEqual(barStringField.containingOneof, oneofBar);
   XCTAssertEqual(barStringField.containingOneof, oneofBar);
   GPBFieldDescriptor *bazString =
   GPBFieldDescriptor *bazString =

+ 15 - 15
objectivec/Tests/GPBMessageTests+Merge.m

@@ -416,7 +416,7 @@
   XCTAssertEqual(dst.oOneOfCase, Message2_O_OneOfCase_OneofGroup);
   XCTAssertEqual(dst.oOneOfCase, Message2_O_OneOfCase_OneofGroup);
   Message2_OneofGroup *mergedGroup = [[dst.oneofGroup retain] autorelease];
   Message2_OneofGroup *mergedGroup = [[dst.oneofGroup retain] autorelease];
   XCTAssertNotNil(mergedGroup);
   XCTAssertNotNil(mergedGroup);
-  XCTAssertNotEqual(mergedGroup, group);  // Pointer comparision.
+  XCTAssertNotEqual(mergedGroup, group);  // Pointer comparison.
   XCTAssertEqualObjects(mergedGroup, group);
   XCTAssertEqualObjects(mergedGroup, group);
   XCTAssertEqualObjects(dst.oneofBytes, oneofBytesDefault);
   XCTAssertEqualObjects(dst.oneofBytes, oneofBytesDefault);
 
 
@@ -427,10 +427,10 @@
   XCTAssertEqual(dst.oOneOfCase, Message2_O_OneOfCase_OneofMessage);
   XCTAssertEqual(dst.oOneOfCase, Message2_O_OneOfCase_OneofMessage);
   Message2 *mergedSubMessage = [[dst.oneofMessage retain] autorelease];
   Message2 *mergedSubMessage = [[dst.oneofMessage retain] autorelease];
   XCTAssertNotNil(mergedSubMessage);
   XCTAssertNotNil(mergedSubMessage);
-  XCTAssertNotEqual(mergedSubMessage, subMessage);  // Pointer comparision.
+  XCTAssertNotEqual(mergedSubMessage, subMessage);  // Pointer comparison.
   XCTAssertEqualObjects(mergedSubMessage, subMessage);
   XCTAssertEqualObjects(mergedSubMessage, subMessage);
   XCTAssertNotNil(dst.oneofGroup);
   XCTAssertNotNil(dst.oneofGroup);
-  XCTAssertNotEqual(dst.oneofGroup, mergedGroup);  // Pointer comparision.
+  XCTAssertNotEqual(dst.oneofGroup, mergedGroup);  // Pointer comparison.
 
 
   // Back to something else to make sure message clears out ok.
   // Back to something else to make sure message clears out ok.
 
 
@@ -439,7 +439,7 @@
   XCTAssertEqual(dst.oOneOfCase, Message2_O_OneOfCase_OneofInt32);
   XCTAssertEqual(dst.oOneOfCase, Message2_O_OneOfCase_OneofInt32);
   XCTAssertNotNil(dst.oneofMessage);
   XCTAssertNotNil(dst.oneofMessage);
   XCTAssertNotEqual(dst.oneofMessage,
   XCTAssertNotEqual(dst.oneofMessage,
-                    mergedSubMessage);  // Pointer comparision.
+                    mergedSubMessage);  // Pointer comparison.
 
 
   //
   //
   // Test merging in to message/group when they already had something.
   // Test merging in to message/group when they already had something.
@@ -452,9 +452,9 @@
   [dst mergeFrom:src];
   [dst mergeFrom:src];
   XCTAssertEqual(dst.oOneOfCase, Message2_O_OneOfCase_OneofGroup);
   XCTAssertEqual(dst.oOneOfCase, Message2_O_OneOfCase_OneofGroup);
   // Shouldn't have been a new object.
   // Shouldn't have been a new object.
-  XCTAssertEqual(dst.oneofGroup, mergedGroup);  // Pointer comparision.
-  XCTAssertEqual(dst.oneofGroup.a, 666);        // Pointer comparision.
-  XCTAssertEqual(dst.oneofGroup.b, 888);        // Pointer comparision.
+  XCTAssertEqual(dst.oneofGroup, mergedGroup);  // Pointer comparison.
+  XCTAssertEqual(dst.oneofGroup.a, 666);        // Pointer comparison.
+  XCTAssertEqual(dst.oneofGroup.b, 888);        // Pointer comparison.
 
 
   src.oneofMessage = subMessage;
   src.oneofMessage = subMessage;
   mergedSubMessage = [Message2 message];
   mergedSubMessage = [Message2 message];
@@ -463,9 +463,9 @@
   [dst mergeFrom:src];
   [dst mergeFrom:src];
   XCTAssertEqual(dst.oOneOfCase, Message2_O_OneOfCase_OneofMessage);
   XCTAssertEqual(dst.oOneOfCase, Message2_O_OneOfCase_OneofMessage);
   // Shouldn't have been a new object.
   // Shouldn't have been a new object.
-  XCTAssertEqual(dst.oneofMessage, mergedSubMessage);   // Pointer comparision.
-  XCTAssertEqual(dst.oneofMessage.optionalInt32, 777);  // Pointer comparision.
-  XCTAssertEqual(dst.oneofMessage.optionalInt64, 999);  // Pointer comparision.
+  XCTAssertEqual(dst.oneofMessage, mergedSubMessage);   // Pointer comparison.
+  XCTAssertEqual(dst.oneofMessage.optionalInt32, 777);  // Pointer comparison.
+  XCTAssertEqual(dst.oneofMessage.optionalInt64, 999);  // Pointer comparison.
 }
 }
 
 
 - (void)testProto3MergeOneof {
 - (void)testProto3MergeOneof {
@@ -637,7 +637,7 @@
   XCTAssertEqual(dst.oOneOfCase, Message3_O_OneOfCase_OneofMessage);
   XCTAssertEqual(dst.oOneOfCase, Message3_O_OneOfCase_OneofMessage);
   Message3 *mergedSubMessage = [[dst.oneofMessage retain] autorelease];
   Message3 *mergedSubMessage = [[dst.oneofMessage retain] autorelease];
   XCTAssertNotNil(mergedSubMessage);
   XCTAssertNotNil(mergedSubMessage);
-  XCTAssertNotEqual(mergedSubMessage, subMessage);  // Pointer comparision.
+  XCTAssertNotEqual(mergedSubMessage, subMessage);  // Pointer comparison.
   XCTAssertEqualObjects(mergedSubMessage, subMessage);
   XCTAssertEqualObjects(mergedSubMessage, subMessage);
   XCTAssertEqualObjects(dst.oneofBytes, oneofBytesDefault);
   XCTAssertEqualObjects(dst.oneofBytes, oneofBytesDefault);
 
 
@@ -648,7 +648,7 @@
   XCTAssertEqual(dst.oOneOfCase, Message3_O_OneOfCase_OneofInt32);
   XCTAssertEqual(dst.oOneOfCase, Message3_O_OneOfCase_OneofInt32);
   XCTAssertNotNil(dst.oneofMessage);
   XCTAssertNotNil(dst.oneofMessage);
   XCTAssertNotEqual(dst.oneofMessage,
   XCTAssertNotEqual(dst.oneofMessage,
-                    mergedSubMessage);  // Pointer comparision.
+                    mergedSubMessage);  // Pointer comparison.
 
 
   //
   //
   // Test merging in to message when they already had something.
   // Test merging in to message when they already had something.
@@ -661,9 +661,9 @@
   [dst mergeFrom:src];
   [dst mergeFrom:src];
   XCTAssertEqual(dst.oOneOfCase, Message3_O_OneOfCase_OneofMessage);
   XCTAssertEqual(dst.oOneOfCase, Message3_O_OneOfCase_OneofMessage);
   // Shouldn't have been a new object.
   // Shouldn't have been a new object.
-  XCTAssertEqual(dst.oneofMessage, mergedSubMessage);   // Pointer comparision.
-  XCTAssertEqual(dst.oneofMessage.optionalInt32, 777);  // Pointer comparision.
-  XCTAssertEqual(dst.oneofMessage.optionalInt64, 999);  // Pointer comparision.
+  XCTAssertEqual(dst.oneofMessage, mergedSubMessage);   // Pointer comparison.
+  XCTAssertEqual(dst.oneofMessage.optionalInt32, 777);  // Pointer comparison.
+  XCTAssertEqual(dst.oneofMessage.optionalInt64, 999);  // Pointer comparison.
 }
 }
 
 
 #pragma mark - Subset from from map_tests.cc
 #pragma mark - Subset from from map_tests.cc

+ 14 - 14
objectivec/Tests/GPBMessageTests+Runtime.m

@@ -212,7 +212,7 @@
   // Proto3 gets:
   // Proto3 gets:
 
 
   // Single fields
   // Single fields
-  //  - has*/setHas* invalid for primative types.
+  //  - has*/setHas* invalid for primitive types.
   //  - has*/setHas* valid for Message.
   //  - has*/setHas* valid for Message.
 
 
   for (NSString *name in names) {
   for (NSString *name in names) {
@@ -2234,7 +2234,7 @@
 - (void)testProto3OneofSetToZero {
 - (void)testProto3OneofSetToZero {
 
 
   // Normally setting a proto3 field to the zero value should result in it being
   // Normally setting a proto3 field to the zero value should result in it being
-  // reset/cleared.  But in a oneof, it still gets recored so it can go out
+  // reset/cleared.  But in a oneof, it still gets recorded so it can go out
   // over the wire and the other side can see what was set in the oneof.
   // over the wire and the other side can see what was set in the oneof.
 
 
   NSString *oneofStringDefault = @"";
   NSString *oneofStringDefault = @"";
@@ -2367,7 +2367,7 @@
   XCTAssertNotEqual(msg1, msg2);      // Ptr compare, new object.
   XCTAssertNotEqual(msg1, msg2);      // Ptr compare, new object.
   XCTAssertEqualObjects(msg1, msg2);  // Equal values.
   XCTAssertEqualObjects(msg1, msg2);  // Equal values.
 
 
-  // Pointer comparisions, different objects.
+  // Pointer comparisons, different objects.
 
 
   XCTAssertNotEqual(msg1.optionalGroup, msg2.optionalGroup);
   XCTAssertNotEqual(msg1.optionalGroup, msg2.optionalGroup);
   XCTAssertNotEqual(msg1.optionalNestedMessage, msg2.optionalNestedMessage);
   XCTAssertNotEqual(msg1.optionalNestedMessage, msg2.optionalNestedMessage);
@@ -2423,7 +2423,7 @@
   XCTAssertNotEqual(msg1, msg2);      // Ptr compare, new object.
   XCTAssertNotEqual(msg1, msg2);      // Ptr compare, new object.
   XCTAssertEqualObjects(msg1, msg2);  // Equal values.
   XCTAssertEqualObjects(msg1, msg2);  // Equal values.
 
 
-  // Pointer comparisions, different objects.
+  // Pointer comparisons, different objects.
   XCTAssertNotEqual(msg1.mapInt32Int32, msg2.mapInt32Int32);
   XCTAssertNotEqual(msg1.mapInt32Int32, msg2.mapInt32Int32);
   XCTAssertNotEqual(msg1.mapInt64Int64, msg2.mapInt64Int64);
   XCTAssertNotEqual(msg1.mapInt64Int64, msg2.mapInt64Int64);
   XCTAssertNotEqual(msg1.mapUint32Uint32, msg2.mapUint32Uint32);
   XCTAssertNotEqual(msg1.mapUint32Uint32, msg2.mapUint32Uint32);
@@ -2492,7 +2492,7 @@
 }
 }
 
 
 - (void)test_StringFieldsCopy {
 - (void)test_StringFieldsCopy {
-  // ObjC conventions call for NSString properites to be copy, ensure
+  // ObjC conventions call for NSString properties to be copy, ensure
   // that is done correctly and the string isn't simply retained.
   // that is done correctly and the string isn't simply retained.
 
 
   Message2 *msg1 = [Message2 message];
   Message2 *msg1 = [Message2 message];
@@ -2507,25 +2507,25 @@
 
 
   XCTAssertEqualObjects(msg1.optionalString, mutableStr);
   XCTAssertEqualObjects(msg1.optionalString, mutableStr);
   XCTAssertEqualObjects(msg1.optionalString, @"foo");
   XCTAssertEqualObjects(msg1.optionalString, @"foo");
-  XCTAssertTrue(msg1.optionalString != mutableStr);  // Ptr comparision.
+  XCTAssertTrue(msg1.optionalString != mutableStr);  // Ptr comparison.
 
 
   XCTAssertEqualObjects(msg2.optionalString, mutableStr);
   XCTAssertEqualObjects(msg2.optionalString, mutableStr);
   XCTAssertEqualObjects(msg2.optionalString, @"foo");
   XCTAssertEqualObjects(msg2.optionalString, @"foo");
-  XCTAssertTrue(msg2.optionalString != mutableStr);  // Ptr comparision.
+  XCTAssertTrue(msg2.optionalString != mutableStr);  // Ptr comparison.
 
 
   [mutableStr appendString:@"bar"];
   [mutableStr appendString:@"bar"];
 
 
   XCTAssertNotEqualObjects(msg1.optionalString, mutableStr);
   XCTAssertNotEqualObjects(msg1.optionalString, mutableStr);
   XCTAssertEqualObjects(msg1.optionalString, @"foo");
   XCTAssertEqualObjects(msg1.optionalString, @"foo");
-  XCTAssertTrue(msg1.optionalString != mutableStr);  // Ptr comparision.
+  XCTAssertTrue(msg1.optionalString != mutableStr);  // Ptr comparison.
 
 
   XCTAssertNotEqualObjects(msg2.optionalString, mutableStr);
   XCTAssertNotEqualObjects(msg2.optionalString, mutableStr);
   XCTAssertEqualObjects(msg2.optionalString, @"foo");
   XCTAssertEqualObjects(msg2.optionalString, @"foo");
-  XCTAssertTrue(msg2.optionalString != mutableStr);  // Ptr comparision.
+  XCTAssertTrue(msg2.optionalString != mutableStr);  // Ptr comparison.
 }
 }
 
 
 - (void)test_BytesFieldsCopy {
 - (void)test_BytesFieldsCopy {
-  // ObjC conventions call for NSData properites to be copy, ensure
+  // ObjC conventions call for NSData properties to be copy, ensure
   // that is done correctly and the data isn't simply retained.
   // that is done correctly and the data isn't simply retained.
 
 
   Message2 *msg1 = [Message2 message];
   Message2 *msg1 = [Message2 message];
@@ -2540,21 +2540,21 @@
 
 
   XCTAssertEqualObjects(msg1.optionalBytes, mutableData);
   XCTAssertEqualObjects(msg1.optionalBytes, mutableData);
   XCTAssertEqualObjects(msg1.optionalBytes, DataFromCStr("abc"));
   XCTAssertEqualObjects(msg1.optionalBytes, DataFromCStr("abc"));
-  XCTAssertTrue(msg1.optionalBytes != mutableData);  // Ptr comparision.
+  XCTAssertTrue(msg1.optionalBytes != mutableData);  // Ptr comparison.
 
 
   XCTAssertEqualObjects(msg2.optionalBytes, mutableData);
   XCTAssertEqualObjects(msg2.optionalBytes, mutableData);
   XCTAssertEqualObjects(msg2.optionalBytes, DataFromCStr("abc"));
   XCTAssertEqualObjects(msg2.optionalBytes, DataFromCStr("abc"));
-  XCTAssertTrue(msg2.optionalBytes != mutableData);  // Ptr comparision.
+  XCTAssertTrue(msg2.optionalBytes != mutableData);  // Ptr comparison.
 
 
   [mutableData appendData:DataFromCStr("123")];
   [mutableData appendData:DataFromCStr("123")];
 
 
   XCTAssertNotEqualObjects(msg1.optionalBytes, mutableData);
   XCTAssertNotEqualObjects(msg1.optionalBytes, mutableData);
   XCTAssertEqualObjects(msg1.optionalBytes, DataFromCStr("abc"));
   XCTAssertEqualObjects(msg1.optionalBytes, DataFromCStr("abc"));
-  XCTAssertTrue(msg1.optionalBytes != mutableData);  // Ptr comparision.
+  XCTAssertTrue(msg1.optionalBytes != mutableData);  // Ptr comparison.
 
 
   XCTAssertNotEqualObjects(msg2.optionalBytes, mutableData);
   XCTAssertNotEqualObjects(msg2.optionalBytes, mutableData);
   XCTAssertEqualObjects(msg2.optionalBytes, DataFromCStr("abc"));
   XCTAssertEqualObjects(msg2.optionalBytes, DataFromCStr("abc"));
-  XCTAssertTrue(msg2.optionalBytes != mutableData);  // Ptr comparision.
+  XCTAssertTrue(msg2.optionalBytes != mutableData);  // Ptr comparison.
 }
 }
 
 
 #pragma mark - Subset from from map_tests.cc
 #pragma mark - Subset from from map_tests.cc

+ 9 - 9
objectivec/Tests/GPBMessageTests.m

@@ -1131,10 +1131,10 @@
     XCTAssertNotNil(message.a.iArray);
     XCTAssertNotNil(message.a.iArray);
     XCTAssertFalse([message hasA]);
     XCTAssertFalse([message hasA]);
     GPBInt32Array *iArray = [message.a.iArray retain];
     GPBInt32Array *iArray = [message.a.iArray retain];
-    XCTAssertEqual(iArray->_autocreator, message.a);  // Pointer comparision
+    XCTAssertEqual(iArray->_autocreator, message.a);  // Pointer comparison
     message.a.iArray = [GPBInt32Array arrayWithValue:1];
     message.a.iArray = [GPBInt32Array arrayWithValue:1];
     XCTAssertTrue([message hasA]);
     XCTAssertTrue([message hasA]);
-    XCTAssertNotEqual(message.a.iArray, iArray);  // Pointer comparision
+    XCTAssertNotEqual(message.a.iArray, iArray);  // Pointer comparison
     XCTAssertNil(iArray->_autocreator);
     XCTAssertNil(iArray->_autocreator);
     [iArray release];
     [iArray release];
   }
   }
@@ -1148,10 +1148,10 @@
     GPBAutocreatedArray *strArray =
     GPBAutocreatedArray *strArray =
         (GPBAutocreatedArray *)[message.a.strArray retain];
         (GPBAutocreatedArray *)[message.a.strArray retain];
     XCTAssertTrue([strArray isKindOfClass:[GPBAutocreatedArray class]]);
     XCTAssertTrue([strArray isKindOfClass:[GPBAutocreatedArray class]]);
-    XCTAssertEqual(strArray->_autocreator, message.a);  // Pointer comparision
+    XCTAssertEqual(strArray->_autocreator, message.a);  // Pointer comparison
     message.a.strArray = [NSMutableArray arrayWithObject:@"foo"];
     message.a.strArray = [NSMutableArray arrayWithObject:@"foo"];
     XCTAssertTrue([message hasA]);
     XCTAssertTrue([message hasA]);
-    XCTAssertNotEqual(message.a.strArray, strArray);  // Pointer comparision
+    XCTAssertNotEqual(message.a.strArray, strArray);  // Pointer comparison
     XCTAssertNil(strArray->_autocreator);
     XCTAssertNil(strArray->_autocreator);
     [strArray release];
     [strArray release];
   }
   }
@@ -1348,11 +1348,11 @@
     XCTAssertNotNil(message.a.iToI);
     XCTAssertNotNil(message.a.iToI);
     XCTAssertFalse([message hasA]);
     XCTAssertFalse([message hasA]);
     GPBInt32Int32Dictionary *iToI = [message.a.iToI retain];
     GPBInt32Int32Dictionary *iToI = [message.a.iToI retain];
-    XCTAssertEqual(iToI->_autocreator, message.a);  // Pointer comparision
+    XCTAssertEqual(iToI->_autocreator, message.a);  // Pointer comparison
     message.a.iToI = [[[GPBInt32Int32Dictionary alloc] init] autorelease];
     message.a.iToI = [[[GPBInt32Int32Dictionary alloc] init] autorelease];
     [message.a.iToI setInt32:6 forKey:7];
     [message.a.iToI setInt32:6 forKey:7];
     XCTAssertTrue([message hasA]);
     XCTAssertTrue([message hasA]);
-    XCTAssertNotEqual(message.a.iToI, iToI);  // Pointer comparision
+    XCTAssertNotEqual(message.a.iToI, iToI);  // Pointer comparison
     XCTAssertNil(iToI->_autocreator);
     XCTAssertNil(iToI->_autocreator);
     [iToI release];
     [iToI release];
   }
   }
@@ -1366,11 +1366,11 @@
     GPBAutocreatedDictionary *strToStr =
     GPBAutocreatedDictionary *strToStr =
         (GPBAutocreatedDictionary *)[message.a.strToStr retain];
         (GPBAutocreatedDictionary *)[message.a.strToStr retain];
     XCTAssertTrue([strToStr isKindOfClass:[GPBAutocreatedDictionary class]]);
     XCTAssertTrue([strToStr isKindOfClass:[GPBAutocreatedDictionary class]]);
-    XCTAssertEqual(strToStr->_autocreator, message.a);  // Pointer comparision
+    XCTAssertEqual(strToStr->_autocreator, message.a);  // Pointer comparison
     message.a.strToStr =
     message.a.strToStr =
         [NSMutableDictionary dictionaryWithObject:@"abc" forKey:@"def"];
         [NSMutableDictionary dictionaryWithObject:@"abc" forKey:@"def"];
     XCTAssertTrue([message hasA]);
     XCTAssertTrue([message hasA]);
-    XCTAssertNotEqual(message.a.strToStr, strToStr);  // Pointer comparision
+    XCTAssertNotEqual(message.a.strToStr, strToStr);  // Pointer comparison
     XCTAssertNil(strToStr->_autocreator);
     XCTAssertNil(strToStr->_autocreator);
     [strToStr release];
     [strToStr release];
   }
   }
@@ -1918,7 +1918,7 @@
   aTime = Time_SomethingElse;
   aTime = Time_SomethingElse;
   Time_IsValidValue(aTime);
   Time_IsValidValue(aTime);
 
 
-  // This block confirms the names in the decriptors is what we wanted.
+  // This block confirms the names in the descriptors is what we wanted.
 
 
   GPBEnumDescriptor *descriptor;
   GPBEnumDescriptor *descriptor;
   NSString *valueName;
   NSString *valueName;

+ 1 - 1
objectivec/Tests/GPBObjectiveCPlusPlusTest.mm

@@ -35,7 +35,7 @@
 //
 //
 // This is just a compile test (here to make sure things never regress).
 // This is just a compile test (here to make sure things never regress).
 //
 //
-// Objective C++ can run into issues with how the NS_ENUM/CF_ENUM declartion
+// Objective C++ can run into issues with how the NS_ENUM/CF_ENUM declaration
 // works because of the C++ spec being used for that compilation unit. So
 // works because of the C++ spec being used for that compilation unit. So
 // the fact that these imports all work without errors/warning means things
 // the fact that these imports all work without errors/warning means things
 // are still good.
 // are still good.

+ 1 - 1
objectivec/Tests/GPBSwiftTests.swift

@@ -276,7 +276,7 @@ class GPBBridgeTests: XCTestCase {
     msg5.optionalInt32 = 123
     msg5.optionalInt32 = 123
     msg.optional = msg5
     msg.optional = msg5
     XCTAssertTrue(msg.hasOptionalMessage)
     XCTAssertTrue(msg.hasOptionalMessage)
-    // Modifing the autocreated doesn't replaced the explicit set one.
+    // Modifying the autocreated doesn't replaced the explicit set one.
     autoCreated?.optionalInt32 = 456
     autoCreated?.optionalInt32 = 456
     XCTAssertTrue(msg.hasOptionalMessage)
     XCTAssertTrue(msg.hasOptionalMessage)
     XCTAssertTrue(msg.optional === msg5)
     XCTAssertTrue(msg.optional === msg5)

+ 1 - 1
objectivec/Tests/unittest_extension_chain_f.proto

@@ -34,7 +34,7 @@ package protobuf_unittest;
 import "unittest_extension_chain_g.proto";
 import "unittest_extension_chain_g.proto";
 
 
 // The Root for this file should just be merging in the extensions from C's
 // The Root for this file should just be merging in the extensions from C's
-// Root (because G doens't define anything itself).
+// Root (because G doesn't define anything itself).
 
 
 // The generated source will also have to directly import C's .h file so it can
 // The generated source will also have to directly import C's .h file so it can
 // compile the reference to C's Root class.
 // compile the reference to C's Root class.

+ 2 - 2
php/ext/google/protobuf/array.c

@@ -85,7 +85,7 @@ static zend_object *repeated_field_iter_create(zend_class_entry *ce TSRMLS_DC);
 #endif
 #endif
 
 
 // -----------------------------------------------------------------------------
 // -----------------------------------------------------------------------------
-// RepeatedField creation/desctruction
+// RepeatedField creation/destruction
 // -----------------------------------------------------------------------------
 // -----------------------------------------------------------------------------
 
 
 zend_class_entry* repeated_field_type;
 zend_class_entry* repeated_field_type;
@@ -484,7 +484,7 @@ PHP_METHOD(RepeatedField, getIterator) {
 }
 }
 
 
 // -----------------------------------------------------------------------------
 // -----------------------------------------------------------------------------
-// RepeatedFieldIter creation/desctruction
+// RepeatedFieldIter creation/destruction
 // -----------------------------------------------------------------------------
 // -----------------------------------------------------------------------------
 
 
 // Define object free method.
 // Define object free method.

+ 2 - 2
php/ext/google/protobuf/map.c

@@ -153,7 +153,7 @@ static void map_field_write_dimension(zval *object, zval *key,
                                       zval *value TSRMLS_DC);
                                       zval *value TSRMLS_DC);
 
 
 // -----------------------------------------------------------------------------
 // -----------------------------------------------------------------------------
-// MapField creation/desctruction
+// MapField creation/destruction
 // -----------------------------------------------------------------------------
 // -----------------------------------------------------------------------------
 
 
 zend_class_entry* map_field_type;
 zend_class_entry* map_field_type;
@@ -540,7 +540,7 @@ static zend_function_entry map_field_iter_methods[] = {
 };
 };
 
 
 // -----------------------------------------------------------------------------
 // -----------------------------------------------------------------------------
-// MapFieldIter creation/desctruction
+// MapFieldIter creation/destruction
 // -----------------------------------------------------------------------------
 // -----------------------------------------------------------------------------
 
 
 // Define object free method.
 // Define object free method.

+ 2 - 2
php/ext/google/protobuf/message.c

@@ -106,8 +106,8 @@ PHP_PROTO_OBJECT_DTOR_END
 // Define object create method.
 // Define object create method.
 PHP_PROTO_OBJECT_CREATE_START(MessageHeader, message)
 PHP_PROTO_OBJECT_CREATE_START(MessageHeader, message)
 // Because php call this create func before calling the sub-message's
 // Because php call this create func before calling the sub-message's
-// constructor defined in PHP, it's possible that the decriptor of this class
-// hasn't been added to descritpor pool (when the class is first
+// constructor defined in PHP, it's possible that the descriptor of this class
+// hasn't been added to descriptor pool (when the class is first
 // instantiated). In that case, we will defer the initialization of the custom
 // instantiated). In that case, we will defer the initialization of the custom
 // data to the parent Message's constructor, which will be called by
 // data to the parent Message's constructor, which will be called by
 // sub-message's constructors after the descriptor has been added.
 // sub-message's constructors after the descriptor has been added.

+ 1 - 1
php/ext/google/protobuf/upb.c

@@ -9706,7 +9706,7 @@ static bool start_stringval(upb_json_parser *p) {
   } else if (upb_fielddef_type(p->top->f) != UPB_TYPE_BOOL &&
   } else if (upb_fielddef_type(p->top->f) != UPB_TYPE_BOOL &&
              upb_fielddef_type(p->top->f) != UPB_TYPE_MESSAGE) {
              upb_fielddef_type(p->top->f) != UPB_TYPE_MESSAGE) {
     /* No need to push a frame -- numeric values in quotes remain in the
     /* No need to push a frame -- numeric values in quotes remain in the
-     * current parser frame.  These values must accmulate so we can convert
+     * current parser frame.  These values must accumulate so we can convert
      * them all at once at the end. */
      * them all at once at the end. */
     multipart_startaccum(p);
     multipart_startaccum(p);
     return true;
     return true;

+ 2 - 2
php/ext/google/protobuf/upb.h

@@ -6378,7 +6378,7 @@ typedef struct {
 typedef struct {
 typedef struct {
   /* Space optimization note: we store two pointers here that the JIT
   /* Space optimization note: we store two pointers here that the JIT
    * doesn't need at all; the upb_handlers* inside the sink and
    * doesn't need at all; the upb_handlers* inside the sink and
-   * the dispatch table pointer.  We can optimze so that the JIT uses
+   * the dispatch table pointer.  We can optimize so that the JIT uses
    * smaller stack frames than the interpreter.  The only thing we need
    * smaller stack frames than the interpreter.  The only thing we need
    * to guarantee is that the fallback routines can find end_ofs. */
    * to guarantee is that the fallback routines can find end_ofs. */
   upb_sink sink;
   upb_sink sink;
@@ -6455,7 +6455,7 @@ struct upb_pbdecoder {
   char residual[UPB_DECODER_MAX_RESIDUAL_BYTES];
   char residual[UPB_DECODER_MAX_RESIDUAL_BYTES];
   char *residual_end;
   char *residual_end;
 
 
-  /* Bytes of data that should be discarded from the input beore we start
+  /* Bytes of data that should be discarded from the input before we start
    * parsing again.  We set this when we internally determine that we can
    * parsing again.  We set this when we internally determine that we can
    * safely skip the next N bytes, but this region extends past the current
    * safely skip the next N bytes, but this region extends past the current
    * user buffer. */
    * user buffer. */

+ 1 - 1
php/generate_descriptor_protos.sh

@@ -1,6 +1,6 @@
 #!/usr/bin/env bash
 #!/usr/bin/env bash
 
 
-# Run this script to regenerate desriptor protos after the protocol compiler
+# Run this script to regenerate descriptor protos after the protocol compiler
 # changes.
 # changes.
 
 
 if test ! -e src/google/protobuf/stubs/common.h; then
 if test ! -e src/google/protobuf/stubs/common.h; then

+ 3 - 3
php/src/Google/Protobuf/Any.php

@@ -252,13 +252,13 @@ class Any extends \Google\Protobuf\Internal\Message
      * the method will create a message of the targeted type and fill it with
      * the method will create a message of the targeted type and fill it with
      * the decoded value in Any.
      * the decoded value in Any.
      * @return unpacked message
      * @return unpacked message
-     * @throws \Exception Type url needs to be type.googleapis.com/fully-qulified.
+     * @throws \Exception Type url needs to be type.googleapis.com/fully-qualified.
      * @throws \Exception Class hasn't been added to descriptor pool.
      * @throws \Exception Class hasn't been added to descriptor pool.
      * @throws \Exception cannot decode data in value field.
      * @throws \Exception cannot decode data in value field.
      */
      */
     public function unpack()
     public function unpack()
     {
     {
-        // Get fully qualifed name from type url.
+        // Get fully qualified name from type url.
         $url_prifix_len = strlen(GPBUtil::TYPE_URL_PREFIX);
         $url_prifix_len = strlen(GPBUtil::TYPE_URL_PREFIX);
         if (substr($this->type_url, 0, $url_prifix_len) !=
         if (substr($this->type_url, 0, $url_prifix_len) !=
                 GPBUtil::TYPE_URL_PREFIX) {
                 GPBUtil::TYPE_URL_PREFIX) {
@@ -296,7 +296,7 @@ class Any extends \Google\Protobuf\Internal\Message
             return;
             return;
         }
         }
 
 
-        // Set value using serialzed message.
+        // Set value using serialized message.
         $this->value = $msg->serializeToString();
         $this->value = $msg->serializeToString();
 
 
         // Set type url.
         // Set type url.

+ 3 - 3
php/src/Google/Protobuf/Internal/CodedInputStream.php

@@ -220,7 +220,7 @@ class CodedInputStream
     }
     }
 
 
     /**
     /**
-     * Read 32-bit unsiged integer to $var. If the buffer has less than 4 bytes,
+     * Read 32-bit unsigned integer to $var. If the buffer has less than 4 bytes,
      * return false. Advance buffer with consumed bytes.
      * return false. Advance buffer with consumed bytes.
      * @param $var.
      * @param $var.
      */
      */
@@ -236,7 +236,7 @@ class CodedInputStream
     }
     }
 
 
     /**
     /**
-     * Read 64-bit unsiged integer to $var. If the buffer has less than 8 bytes,
+     * Read 64-bit unsigned integer to $var. If the buffer has less than 8 bytes,
      * return false. Advance buffer with consumed bytes.
      * return false. Advance buffer with consumed bytes.
      * @param $var.
      * @param $var.
      */
      */
@@ -283,7 +283,7 @@ class CodedInputStream
         }
         }
 
 
         $result = 0;
         $result = 0;
-        // The larget tag is 2^29 - 1, which can be represented by int32.
+        // The largest tag is 2^29 - 1, which can be represented by int32.
         $success = $this->readVarint32($result);
         $success = $this->readVarint32($result);
         if ($success) {
         if ($success) {
             return $result;
             return $result;

+ 1 - 1
php/src/Google/Protobuf/Internal/GPBUtil.php

@@ -405,7 +405,7 @@ class GPBUtil
 
 
     public static function parseTimestamp($timestamp)
     public static function parseTimestamp($timestamp)
     {
     {
-        // prevent parsing timestamps containing with the non-existant year "0000"
+        // prevent parsing timestamps containing with the non-existent year "0000"
         // DateTime::createFromFormat parses without failing but as a nonsensical date
         // DateTime::createFromFormat parses without failing but as a nonsensical date
         if (substr($timestamp, 0, 4) === "0000") {
         if (substr($timestamp, 0, 4) === "0000") {
             throw new \Exception("Year cannot be zero.");
             throw new \Exception("Year cannot be zero.");

+ 2 - 2
php/src/Google/Protobuf/Internal/Message.php

@@ -679,8 +679,8 @@ class Message
      * This method merges the contents of the specified message into the
      * This method merges the contents of the specified message into the
      * current message. Singular fields that are set in the specified message
      * current message. Singular fields that are set in the specified message
      * overwrite the corresponding fields in the current message.  Repeated
      * overwrite the corresponding fields in the current message.  Repeated
-     * fields are appended. Map fields key-value pairs are overritten.
-     * Singular/Oneof sub-messages are recursively merged. All overritten
+     * fields are appended. Map fields key-value pairs are overwritten.
+     * Singular/Oneof sub-messages are recursively merged. All overwritten
      * sub-messages are deep-copied.
      * sub-messages are deep-copied.
      *
      *
      * @param object $msg Protobuf message to be merged from.
      * @param object $msg Protobuf message to be merged from.

+ 1 - 1
protobuf.bzl

@@ -250,7 +250,7 @@ def cc_proto_library(
       include: a string indicating the include path of the .proto files.
       include: a string indicating the include path of the .proto files.
       protoc: the label of the protocol compiler to generate the sources.
       protoc: the label of the protocol compiler to generate the sources.
       internal_bootstrap_hack: a flag indicate the cc_proto_library is used only
       internal_bootstrap_hack: a flag indicate the cc_proto_library is used only
-          for bootstraping. When it is set to True, no files will be generated.
+          for bootstrapping. When it is set to True, no files will be generated.
           The rule will simply be a provider for .proto files, so that other
           The rule will simply be a provider for .proto files, so that other
           cc_proto_library can depend on it.
           cc_proto_library can depend on it.
       use_grpc_plugin: a flag to indicate whether to call the grpc C++ plugin
       use_grpc_plugin: a flag to indicate whether to call the grpc C++ plugin

+ 1 - 1
python/compatibility_tests/v2.5.0/protos/src/proto/google/protobuf/descriptor.proto

@@ -228,7 +228,7 @@ message MethodDescriptorProto {
 // * For options which will be published and used publicly by multiple
 // * For options which will be published and used publicly by multiple
 //   independent entities, e-mail protobuf-global-extension-registry@google.com
 //   independent entities, e-mail protobuf-global-extension-registry@google.com
 //   to reserve extension numbers. Simply provide your project name (e.g.
 //   to reserve extension numbers. Simply provide your project name (e.g.
-//   Object-C plugin) and your porject website (if available) -- there's no need
+//   Object-C plugin) and your project website (if available) -- there's no need
 //   to explain how you intend to use them. Usually you only need one extension
 //   to explain how you intend to use them. Usually you only need one extension
 //   number. You can declare multiple options with only one extension number by
 //   number. You can declare multiple options with only one extension number by
 //   putting them in a sub-message. See the Custom Options section of the docs
 //   putting them in a sub-message. See the Custom Options section of the docs

+ 1 - 1
python/compatibility_tests/v2.5.0/protos/src/proto/google/protobuf/unittest_custom_options.proto

@@ -321,7 +321,7 @@ message Aggregate {
 }
 }
 
 
 // Allow Aggregate to be used as an option at all possible locations
 // Allow Aggregate to be used as an option at all possible locations
-// in the .proto grammer.
+// in the .proto grammar.
 extend google.protobuf.FileOptions      { optional Aggregate fileopt    = 15478479; }
 extend google.protobuf.FileOptions      { optional Aggregate fileopt    = 15478479; }
 extend google.protobuf.MessageOptions   { optional Aggregate msgopt     = 15480088; }
 extend google.protobuf.MessageOptions   { optional Aggregate msgopt     = 15480088; }
 extend google.protobuf.FieldOptions     { optional Aggregate fieldopt   = 15481374; }
 extend google.protobuf.FieldOptions     { optional Aggregate fieldopt   = 15481374; }

+ 1 - 1
python/compatibility_tests/v2.5.0/protos/src/proto/google/protobuf/unittest_import.proto

@@ -43,7 +43,7 @@ package protobuf_unittest_import;
 
 
 option optimize_for = SPEED;
 option optimize_for = SPEED;
 
 
-// Excercise the java_package option.
+// Exercise the java_package option.
 option java_package = "com.google.protobuf.test";
 option java_package = "com.google.protobuf.test";
 
 
 // Do not set a java_outer_classname here to verify that Proto2 works without
 // Do not set a java_outer_classname here to verify that Proto2 works without

+ 1 - 1
python/compatibility_tests/v2.5.0/test.sh

@@ -12,7 +12,7 @@ TEST_VERSION=2.5.0
 # The old version of protobuf that we are testing compatibility against. This
 # The old version of protobuf that we are testing compatibility against. This
 # is usually the same as TEST_VERSION (i.e., we use the tests extracted from
 # is usually the same as TEST_VERSION (i.e., we use the tests extracted from
 # that version to test compatibility of the newest runtime against it), but it
 # that version to test compatibility of the newest runtime against it), but it
-# is also possible to use this same test set to test the compatibiilty of the
+# is also possible to use this same test set to test the compatibility of the
 # latest version against other versions.
 # latest version against other versions.
 OLD_VERSION=$1
 OLD_VERSION=$1
 OLD_VERSION_PROTOC=http://repo1.maven.org/maven2/com/google/protobuf/protoc/$OLD_VERSION/protoc-$OLD_VERSION-linux-x86_64.exe
 OLD_VERSION_PROTOC=http://repo1.maven.org/maven2/com/google/protobuf/protoc/$OLD_VERSION/protoc-$OLD_VERSION-linux-x86_64.exe

+ 1 - 1
python/compatibility_tests/v2.5.0/tests/google/protobuf/internal/generator_test.py

@@ -148,7 +148,7 @@ class GeneratorTest(unittest.TestCase):
     proto = unittest_custom_options_pb2.TestMessageWithCustomOptions()
     proto = unittest_custom_options_pb2.TestMessageWithCustomOptions()
     enum_options = proto.DESCRIPTOR.enum_types_by_name['AnEnum'].GetOptions()
     enum_options = proto.DESCRIPTOR.enum_types_by_name['AnEnum'].GetOptions()
     self.assertTrue(enum_options is not None)
     self.assertTrue(enum_options is not None)
-    # TODO(gps): We really should test for the presense of the enum_opt1
+    # TODO(gps): We really should test for the presence of the enum_opt1
     # extension and for its value to be set to -789.
     # extension and for its value to be set to -789.
 
 
   def testNestedTypes(self):
   def testNestedTypes(self):

+ 1 - 1
python/compatibility_tests/v2.5.0/tests/google/protobuf/internal/service_reflection_test.py

@@ -118,7 +118,7 @@ class FooUnitTest(unittest.TestCase):
     rpc_controller = 'controller'
     rpc_controller = 'controller'
     request = 'request'
     request = 'request'
 
 
-    # GetDescriptor now static, still works as instance method for compatability
+    # GetDescriptor now static, still works as instance method for compatibility
     self.assertEqual(unittest_pb2.TestService_Stub.GetDescriptor(),
     self.assertEqual(unittest_pb2.TestService_Stub.GetDescriptor(),
                      stub.GetDescriptor())
                      stub.GetDescriptor())
 
 

+ 1 - 1
python/compatibility_tests/v2.5.0/tests/google/protobuf/internal/text_format_test.py

@@ -247,7 +247,7 @@ class TextFormatTest(unittest.TestCase):
     text = text.replace('e+0','e+').replace('e+0','e+') \
     text = text.replace('e+0','e+').replace('e+0','e+') \
                .replace('e-0','e-').replace('e-0','e-')
                .replace('e-0','e-').replace('e-0','e-')
     # Floating point fields are printed with .0 suffix even if they are
     # Floating point fields are printed with .0 suffix even if they are
-    # actualy integer numbers.
+    # actually integer numbers.
     text = re.compile(r'\.0$', re.MULTILINE).sub('', text)
     text = re.compile(r'\.0$', re.MULTILINE).sub('', text)
     return text
     return text
 
 

+ 2 - 2
python/google/protobuf/descriptor.py

@@ -186,7 +186,7 @@ class _NestedDescriptorBase(DescriptorBase):
         file.serialized_pb that describes this descriptor.
         file.serialized_pb that describes this descriptor.
       serialized_end: The end index (exclusive) in block in the
       serialized_end: The end index (exclusive) in block in the
         file.serialized_pb that describes this descriptor.
         file.serialized_pb that describes this descriptor.
-      serialized_options: Protocol message serilized options or None.
+      serialized_options: Protocol message serialized options or None.
     """
     """
     super(_NestedDescriptorBase, self).__init__(
     super(_NestedDescriptorBase, self).__init__(
         options, serialized_options, options_class_name)
         options, serialized_options, options_class_name)
@@ -753,7 +753,7 @@ class ServiceDescriptor(_NestedDescriptorBase):
     name: (str) Name of the service.
     name: (str) Name of the service.
     full_name: (str) Full name of the service, including package name.
     full_name: (str) Full name of the service, including package name.
     index: (int) 0-indexed index giving the order that this services
     index: (int) 0-indexed index giving the order that this services
-      definition appears withing the .proto file.
+      definition appears within the .proto file.
     methods: (list of MethodDescriptor) List of methods provided by this
     methods: (list of MethodDescriptor) List of methods provided by this
       service.
       service.
     methods_by_name: (dict str -> MethodDescriptor) Same MethodDescriptor
     methods_by_name: (dict str -> MethodDescriptor) Same MethodDescriptor

+ 2 - 2
python/google/protobuf/descriptor_pool.py

@@ -639,7 +639,7 @@ class DescriptorPool(object):
     return list(self._extensions_by_number[message_descriptor].values())
     return list(self._extensions_by_number[message_descriptor].values())
 
 
   def _TryLoadExtensionFromDB(self, message_descriptor, number):
   def _TryLoadExtensionFromDB(self, message_descriptor, number):
-    """Try to Load extensions from decriptor db.
+    """Try to Load extensions from descriptor db.
 
 
     Args:
     Args:
       message_descriptor: descriptor of the extended message.
       message_descriptor: descriptor of the extended message.
@@ -1034,7 +1034,7 @@ class DescriptorPool(object):
 
 
     Args:
     Args:
       field_proto: Data about the field in proto format.
       field_proto: Data about the field in proto format.
-      field_desc: The descriptor to modiy.
+      field_desc: The descriptor to modify.
       package: The package the field's container is in.
       package: The package the field's container is in.
       scope: Enclosing scope of available types.
       scope: Enclosing scope of available types.
     """
     """

+ 1 - 1
python/google/protobuf/internal/extension_dict.py

@@ -139,7 +139,7 @@ class _ExtensionDict(object):
 
 
   # Note that this is only meaningful for non-repeated, scalar extension
   # Note that this is only meaningful for non-repeated, scalar extension
   # fields.  Note also that we may have to call _Modified() when we do
   # fields.  Note also that we may have to call _Modified() when we do
-  # successfully set a field this way, to set any necssary "has" bits in the
+  # successfully set a field this way, to set any necessary "has" bits in the
   # ancestors of the extended message.
   # ancestors of the extended message.
   def __setitem__(self, extension_handle, value):
   def __setitem__(self, extension_handle, value):
     """If extension_handle specifies a non-repeated, scalar extension
     """If extension_handle specifies a non-repeated, scalar extension

+ 1 - 1
python/google/protobuf/internal/text_format_test.py

@@ -97,7 +97,7 @@ class TextFormatBase(unittest.TestCase):
     text = text.replace('e+0','e+').replace('e+0','e+') \
     text = text.replace('e+0','e+').replace('e+0','e+') \
                .replace('e-0','e-').replace('e-0','e-')
                .replace('e-0','e-').replace('e-0','e-')
     # Floating point fields are printed with .0 suffix even if they are
     # Floating point fields are printed with .0 suffix even if they are
-    # actualy integer numbers.
+    # actually integer numbers.
     text = re.compile(r'\.0$', re.MULTILINE).sub('', text)
     text = re.compile(r'\.0$', re.MULTILINE).sub('', text)
     return text
     return text
 
 

+ 1 - 1
python/google/protobuf/internal/type_checkers.py

@@ -38,7 +38,7 @@ TYPE_TO_BYTE_SIZE_FN: A dictionary with field types and a size computing
 TYPE_TO_SERIALIZE_METHOD: A dictionary with field types and serialization
 TYPE_TO_SERIALIZE_METHOD: A dictionary with field types and serialization
   function.
   function.
 FIELD_TYPE_TO_WIRE_TYPE: A dictionary with field typed and their
 FIELD_TYPE_TO_WIRE_TYPE: A dictionary with field typed and their
-  coresponding wire types.
+  corresponding wire types.
 TYPE_TO_DESERIALIZE_METHOD: A dictionary with field types and deserialization
 TYPE_TO_DESERIALIZE_METHOD: A dictionary with field types and deserialization
   function.
   function.
 """
 """

+ 1 - 1
python/google/protobuf/json_format.py

@@ -265,7 +265,7 @@ class _Printer(object):
           else:
           else:
             name = field.json_name
             name = field.json_name
           if name in js:
           if name in js:
-            # Skip the field which has been serailized already.
+            # Skip the field which has been serialized already.
             continue
             continue
           if _IsMapEntry(field):
           if _IsMapEntry(field):
             js[name] = {}
             js[name] = {}

+ 1 - 1
python/google/protobuf/pyext/descriptor.cc

@@ -481,7 +481,7 @@ static PyObject* GetFile(PyBaseDescriptor *self, void *closure) {
 }
 }
 
 
 static PyObject* GetConcreteClass(PyBaseDescriptor* self, void *closure) {
 static PyObject* GetConcreteClass(PyBaseDescriptor* self, void *closure) {
-  // Retuns the canonical class for the given descriptor.
+  // Returns the canonical class for the given descriptor.
   // This is the class that was registered with the primary descriptor pool
   // This is the class that was registered with the primary descriptor pool
   // which contains this descriptor.
   // which contains this descriptor.
   // This might not be the one you expect! For example the returned object does
   // This might not be the one you expect! For example the returned object does

+ 1 - 1
python/google/protobuf/pyext/unknown_fields.cc

@@ -246,7 +246,7 @@ static PyObject* GetWireType(PyUnknownFieldRef* self, void *closure) {
     return NULL;
     return NULL;
   }
   }
 
 
-  // Assign a default value to suppress may-unintialized warnings (errors
+  // Assign a default value to suppress may-uninitialized warnings (errors
   // when built in some places).
   // when built in some places).
   WireFormatLite::WireType wire_type = WireFormatLite::WIRETYPE_VARINT;
   WireFormatLite::WireType wire_type = WireFormatLite::WIRETYPE_VARINT;
   switch (unknown_field->type()) {
   switch (unknown_field->type()) {

+ 1 - 1
python/mox.py

@@ -705,7 +705,7 @@ class MockMethod(object):
     """Move this method into group of calls which may be called multiple times.
     """Move this method into group of calls which may be called multiple times.
 
 
     A group of repeating calls must be defined together, and must be executed in
     A group of repeating calls must be defined together, and must be executed in
-    full before the next expected mehtod can be called.
+    full before the next expected method can be called.
 
 
     Args:
     Args:
       group_name: the name of the unordered group.
       group_name: the name of the unordered group.

+ 1 - 1
ruby/compatibility_tests/v3.0.0/README.md

@@ -1,5 +1,5 @@
 # Protobuf Ruby Compatibility Tests
 # Protobuf Ruby Compatibility Tests
 
 
-This drectory contains a snapshot of protobuf ruby 3.0.0 unittest code and
+This directory contains a snapshot of protobuf ruby 3.0.0 unittest code and
 test scripts used to verifies whether the latest version of protobuf is
 test scripts used to verifies whether the latest version of protobuf is
 still compatible with 3.0.0 generated code.
 still compatible with 3.0.0 generated code.

+ 2 - 2
ruby/ext/google/protobuf_c/defs.c

@@ -136,7 +136,7 @@ static void rewrite_enum_default(const upb_symtab* symtab,
  * same number.
  * same number.
  *
  *
  * Here we do a pass over all enum defaults and rewrite numeric defaults by
  * Here we do a pass over all enum defaults and rewrite numeric defaults by
- * looking up their labels.  This is compilcated by the fact that the enum
+ * looking up their labels.  This is complicated by the fact that the enum
  * definition can live in either the symtab or the file_proto.
  * definition can live in either the symtab or the file_proto.
  * */
  * */
 static void rewrite_enum_defaults(
 static void rewrite_enum_defaults(
@@ -572,7 +572,7 @@ VALUE Descriptor_file_descriptor(VALUE _self) {
  * call-seq:
  * call-seq:
  *     Descriptor.name => name
  *     Descriptor.name => name
  *
  *
- * Returns the name of this message type as a fully-qualfied string (e.g.,
+ * Returns the name of this message type as a fully-qualified string (e.g.,
  * My.Package.MessageType).
  * My.Package.MessageType).
  */
  */
 VALUE Descriptor_name(VALUE _self) {
 VALUE Descriptor_name(VALUE _self) {

+ 1 - 1
ruby/ext/google/protobuf_c/upb.c

@@ -9697,7 +9697,7 @@ static bool start_stringval(upb_json_parser *p) {
   } else if (upb_fielddef_type(p->top->f) != UPB_TYPE_BOOL &&
   } else if (upb_fielddef_type(p->top->f) != UPB_TYPE_BOOL &&
              upb_fielddef_type(p->top->f) != UPB_TYPE_MESSAGE) {
              upb_fielddef_type(p->top->f) != UPB_TYPE_MESSAGE) {
     /* No need to push a frame -- numeric values in quotes remain in the
     /* No need to push a frame -- numeric values in quotes remain in the
-     * current parser frame.  These values must accmulate so we can convert
+     * current parser frame.  These values must accumulate so we can convert
      * them all at once at the end. */
      * them all at once at the end. */
     multipart_startaccum(p);
     multipart_startaccum(p);
     return true;
     return true;

+ 2 - 2
ruby/ext/google/protobuf_c/upb.h

@@ -6368,7 +6368,7 @@ typedef struct {
 typedef struct {
 typedef struct {
   /* Space optimization note: we store two pointers here that the JIT
   /* Space optimization note: we store two pointers here that the JIT
    * doesn't need at all; the upb_handlers* inside the sink and
    * doesn't need at all; the upb_handlers* inside the sink and
-   * the dispatch table pointer.  We can optimze so that the JIT uses
+   * the dispatch table pointer.  We can optimize so that the JIT uses
    * smaller stack frames than the interpreter.  The only thing we need
    * smaller stack frames than the interpreter.  The only thing we need
    * to guarantee is that the fallback routines can find end_ofs. */
    * to guarantee is that the fallback routines can find end_ofs. */
   upb_sink sink;
   upb_sink sink;
@@ -6445,7 +6445,7 @@ struct upb_pbdecoder {
   char residual[UPB_DECODER_MAX_RESIDUAL_BYTES];
   char residual[UPB_DECODER_MAX_RESIDUAL_BYTES];
   char *residual_end;
   char *residual_end;
 
 
-  /* Bytes of data that should be discarded from the input beore we start
+  /* Bytes of data that should be discarded from the input before we start
    * parsing again.  We set this when we internally determine that we can
    * parsing again.  We set this when we internally determine that we can
    * safely skip the next N bytes, but this region extends past the current
    * safely skip the next N bytes, but this region extends past the current
    * user buffer. */
    * user buffer. */

+ 1 - 1
ruby/src/main/java/com/google/protobuf/jruby/RubyDescriptor.java

@@ -85,7 +85,7 @@ public class RubyDescriptor extends RubyObject {
      * call-seq:
      * call-seq:
      *     Descriptor.name => name
      *     Descriptor.name => name
      *
      *
-     * Returns the name of this message type as a fully-qualfied string (e.g.,
+     * Returns the name of this message type as a fully-qualified string (e.g.,
      * My.Package.MessageType).
      * My.Package.MessageType).
      */
      */
     @JRubyMethod(name = "name")
     @JRubyMethod(name = "name")

+ 1 - 1
src/google/protobuf/compiler/annotation_test_util.h

@@ -60,7 +60,7 @@ struct ExpectedOutput {
 // directory.
 // directory.
 void AddFile(const std::string& filename, const std::string& data);
 void AddFile(const std::string& filename, const std::string& data);
 
 
-// Runs proto compiler. Captures proto file structrue in FileDescriptorProto.
+// Runs proto compiler. Captures proto file structure in FileDescriptorProto.
 // Files will be generated in TestTempDir() folder. Callers of this
 // Files will be generated in TestTempDir() folder. Callers of this
 // function must read generated files themselves.
 // function must read generated files themselves.
 //
 //

+ 1 - 1
src/google/protobuf/compiler/code_generator.cc

@@ -50,7 +50,7 @@ bool CodeGenerator::GenerateAll(const std::vector<const FileDescriptor*>& files,
                                 const std::string& parameter,
                                 const std::string& parameter,
                                 GeneratorContext* generator_context,
                                 GeneratorContext* generator_context,
                                 std::string* error) const {
                                 std::string* error) const {
-  // Default implemenation is just to call the per file method, and prefix any
+  // Default implementation is just to call the per file method, and prefix any
   // error string with the file to provide context.
   // error string with the file to provide context.
   bool succeeded = true;
   bool succeeded = true;
   for (int i = 0; i < files.size(); i++) {
   for (int i = 0; i < files.size(); i++) {

+ 1 - 1
src/google/protobuf/compiler/command_line_interface.cc

@@ -2280,7 +2280,7 @@ namespace {
 // Nested Messages:
 // Nested Messages:
 // Note that it only stores the nested message type, iff the nested type is
 // Note that it only stores the nested message type, iff the nested type is
 // either a direct child of the given descriptor, or the nested type is a
 // either a direct child of the given descriptor, or the nested type is a
-// decendent of the given descriptor and all the nodes between the
+// descendant of the given descriptor and all the nodes between the
 // nested type and the given descriptor are group types. e.g.
 // nested type and the given descriptor are group types. e.g.
 //
 //
 // message Foo {
 // message Foo {

+ 2 - 2
src/google/protobuf/compiler/command_line_interface.h

@@ -97,7 +97,7 @@ class DiskSourceTree;    // importer.h
 //   protoc --cpp_out=outdir --foo_out=outdir --proto_path=src src/foo.proto
 //   protoc --cpp_out=outdir --foo_out=outdir --proto_path=src src/foo.proto
 //
 //
 // The .proto file to compile can be specified on the command line using either
 // The .proto file to compile can be specified on the command line using either
-// its physical file path, or a virtual path relative to a diretory specified
+// its physical file path, or a virtual path relative to a directory specified
 // in --proto_path. For example, for src/foo.proto, the following two protoc
 // in --proto_path. For example, for src/foo.proto, the following two protoc
 // invocations work the same way:
 // invocations work the same way:
 //   1. protoc --proto_path=src src/foo.proto (physical file path)
 //   1. protoc --proto_path=src src/foo.proto (physical file path)
@@ -194,7 +194,7 @@ class PROTOC_EXPORT CommandLineInterface {
   // DEPRECATED. Calling this method has no effect. Protocol compiler now
   // DEPRECATED. Calling this method has no effect. Protocol compiler now
   // always try to find the .proto file relative to the current directory
   // always try to find the .proto file relative to the current directory
   // first and if the file is not found, it will then treat the input path
   // first and if the file is not found, it will then treat the input path
-  // as a virutal path.
+  // as a virtual path.
   void SetInputsAreProtoPathRelative(bool /* enable */) {}
   void SetInputsAreProtoPathRelative(bool /* enable */) {}
 
 
   // Provides some text which will be printed when the --version flag is
   // Provides some text which will be printed when the --version flag is

+ 1 - 1
src/google/protobuf/compiler/command_line_interface_unittest.cc

@@ -1074,7 +1074,7 @@ TEST_F(CommandLineInterfaceTest, UnrecognizedExtraParameters) {
 }
 }
 
 
 TEST_F(CommandLineInterfaceTest, ExtraPluginParametersForOutParameters) {
 TEST_F(CommandLineInterfaceTest, ExtraPluginParametersForOutParameters) {
-  // This doesn't rely on the plugin having been registred and instead that
+  // This doesn't rely on the plugin having been registered and instead that
   // the existence of --[name]_out is enough to make the --[name]_opt valid.
   // the existence of --[name]_out is enough to make the --[name]_opt valid.
   // However, running out of process plugins found via the search path (i.e. -
   // However, running out of process plugins found via the search path (i.e. -
   // not pre registered with --plugin) isn't support in this test suite, so we
   // not pre registered with --plugin) isn't support in this test suite, so we

+ 1 - 1
src/google/protobuf/compiler/cpp/cpp_file.cc

@@ -1185,7 +1185,7 @@ void FileGenerator::GenerateForwardDeclarations(io::Printer* printer) {
   FlattenMessagesInFile(file_, &classes);  // All messages need forward decls.
   FlattenMessagesInFile(file_, &classes);  // All messages need forward decls.
 
 
   if (options_.proto_h) {  // proto.h needs extra forward declarations.
   if (options_.proto_h) {  // proto.h needs extra forward declarations.
-    // All classes / enums refered to as field members
+    // All classes / enums referred to as field members
     std::vector<const FieldDescriptor*> fields;
     std::vector<const FieldDescriptor*> fields;
     ListAllFields(file_, &fields);
     ListAllFields(file_, &fields);
     for (int i = 0; i < fields.size(); i++) {
     for (int i = 0; i < fields.size(); i++) {

+ 1 - 1
src/google/protobuf/compiler/cpp/cpp_file.h

@@ -148,7 +148,7 @@ class FileGenerator {
   // Generates extension identifiers.
   // Generates extension identifiers.
   void GenerateExtensionIdentifiers(io::Printer* printer);
   void GenerateExtensionIdentifiers(io::Printer* printer);
 
 
-  // Generates inline function defintions.
+  // Generates inline function definitions.
   void GenerateInlineFunctionDefinitions(io::Printer* printer);
   void GenerateInlineFunctionDefinitions(io::Printer* printer);
 
 
   void GenerateProto2NamespaceEnumSpecializations(io::Printer* printer);
   void GenerateProto2NamespaceEnumSpecializations(io::Printer* printer);

+ 1 - 1
src/google/protobuf/compiler/cpp/cpp_message.cc

@@ -232,7 +232,7 @@ bool HasPrivateHasMethod(const FieldDescriptor* field) {
 }
 }
 
 
 // TODO(ckennelly):  Cull these exclusions if/when these protos do not have
 // TODO(ckennelly):  Cull these exclusions if/when these protos do not have
-// their methods overriden by subclasses.
+// their methods overridden by subclasses.
 
 
 bool ShouldMarkClassAsFinal(const Descriptor* descriptor,
 bool ShouldMarkClassAsFinal(const Descriptor* descriptor,
                             const Options& options) {
                             const Options& options) {

+ 1 - 1
src/google/protobuf/compiler/importer.h

@@ -254,7 +254,7 @@ class PROTOBUF_EXPORT DiskSourceTree : public SourceTree {
   // and then you do:
   // and then you do:
   //   Open("bar/qux");
   //   Open("bar/qux");
   // the DiskSourceTree will first try to open foo/bar/qux, then baz/bar/qux,
   // the DiskSourceTree will first try to open foo/bar/qux, then baz/bar/qux,
-  // returning the first one that opens successfuly.
+  // returning the first one that opens successfully.
   //
   //
   // disk_path may be an absolute path or relative to the current directory,
   // disk_path may be an absolute path or relative to the current directory,
   // just like a path you'd pass to open().
   // just like a path you'd pass to open().

部分文件因为文件数量过多而无法显示