diff --git a/csharp/src/Google.Protobuf/CodedInputStream.cs b/csharp/src/Google.Protobuf/CodedInputStream.cs index 912c11f74f..96ae84c3fe 100644 --- a/csharp/src/Google.Protobuf/CodedInputStream.cs +++ b/csharp/src/Google.Protobuf/CodedInputStream.cs @@ -431,7 +431,7 @@ namespace Google.Protobuf { // TODO(jtattermusch): if the message doesn't implement IBufferMessage (and thus does not provide the InternalMergeFrom method), // what we're doing here works fine, but could be more efficient. - // What happends is that we first initialize a ParseContext from the current coded input stream only to parse the length of the message, at which point + // What happens is that we first initialize a ParseContext from the current coded input stream only to parse the length of the message, at which point // we will need to switch back again to CodedInputStream-based parsing (which involves copying and storing the state) to be able to // invoke the legacy MergeFrom(CodedInputStream) method. // For now, this inefficiency is fine, considering this is only a backward-compatibility scenario (and regenerating the code fixes it). diff --git a/csharp/src/Google.Protobuf/Reflection/ExtensionCollection.cs b/csharp/src/Google.Protobuf/Reflection/ExtensionCollection.cs index 9664559df2..ca874f9885 100644 --- a/csharp/src/Google.Protobuf/Reflection/ExtensionCollection.cs +++ b/csharp/src/Google.Protobuf/Reflection/ExtensionCollection.cs @@ -93,7 +93,7 @@ namespace Google.Protobuf.Reflection /// /// Returns a readonly list of all the extensions define in this type that extend - /// the provided descriptor type in accending field order + /// the provided descriptor type in ascending field order /// public IList GetExtensionsInNumberOrder(MessageDescriptor descriptor) { diff --git a/docs/field_presence.md b/docs/field_presence.md index ed763758bd..218622dea9 100644 --- a/docs/field_presence.md +++ b/docs/field_presence.md @@ -16,7 +16,7 @@ _Presence disciplines_ define the semantics for translating between the _API rep The wire format is a stream of tagged, _self-delimiting_ values. By definition, the wire format represents a sequence of _present_ values. In other words, every value found within a serialization represents a _present_ field; furthermore, the serialization contains no information about not-present values. -The generated API for a proto message includes (de)serialization definitions which translate between API types and a stream of definitionally _present_ (tag, value) pairs. This translation is designed to be forward- and backward-compatibile across changes to the message definition; however, this compatibility introduces some (perhaps surprising) considerations when deserializing wire-formatted messages: +The generated API for a proto message includes (de)serialization definitions which translate between API types and a stream of definitionally _present_ (tag, value) pairs. This translation is designed to be forward- and backward-compatible across changes to the message definition; however, this compatibility introduces some (perhaps surprising) considerations when deserializing wire-formatted messages: - When serializing, fields with _no presence_ are not serialized if they contain their default value. - For numeric types, the default is 0. diff --git a/post_process_dist.sh b/post_process_dist.sh index 5b14de6720..116824dd94 100755 --- a/post_process_dist.sh +++ b/post_process_dist.sh @@ -11,7 +11,7 @@ # 2005 *or* 2008 can open them. (In version control, we keep things in # MSVC 2008 format since that's what we use in development.) # 4) Uses the result to create .tar.gz, .tar.bz2, and .zip versions and -# deposites them in the "dist" directory. In the .zip version, all +# deposits them in the "dist" directory. In the .zip version, all # non-testdata .txt files are converted to Windows-style line endings. # 5) Cleans up after itself. diff --git a/src/google/protobuf/compiler/cpp/helpers.h b/src/google/protobuf/compiler/cpp/helpers.h index bab25018d2..7ad724447f 100644 --- a/src/google/protobuf/compiler/cpp/helpers.h +++ b/src/google/protobuf/compiler/cpp/helpers.h @@ -767,7 +767,7 @@ inline bool HasImplData(const Descriptor* desc, const Options& options) { // but consider using named variables. Named variables like $foo$, with some // identifier foo, are looked up in the map. One additional feature is that // spaces are accepted between the '$' delimiters, $ foo$ will -// substiture to " bar" if foo stands for "bar", but in case it's empty +// substitute to " bar" if foo stands for "bar", but in case it's empty // will substitute to "". Hence, for example, // // Format(vars, "$dllexport $void fun();") -> "void fun();" diff --git a/src/google/protobuf/io/coded_stream.cc b/src/google/protobuf/io/coded_stream.cc index aacf007d7f..487e1b8a37 100644 --- a/src/google/protobuf/io/coded_stream.cc +++ b/src/google/protobuf/io/coded_stream.cc @@ -392,7 +392,7 @@ inline ::std::pair ReadVarint32FromArray( b = *(ptr++); result += b << 28; if (!(b & 0x80)) goto done; - // "result -= 0x80 << 28" is irrevelant. + // "result -= 0x80 << 28" is irrelevant. // If the input is larger than 32 bits, we still need to read it all // and discard the high-order bits. diff --git a/src/google/protobuf/parse_context.h b/src/google/protobuf/parse_context.h index 7c021c4e09..81b27b738b 100644 --- a/src/google/protobuf/parse_context.h +++ b/src/google/protobuf/parse_context.h @@ -410,7 +410,7 @@ class PROTOBUF_EXPORT ParseContext : public EpsCopyInputStream { // Spawns a child parsing context that inherits key properties. New context // inherits the following: // --depth_, data_, check_required_fields_, lazy_parse_mode_ - // The spanwed context always disables aliasing (different input). + // The spawned context always disables aliasing (different input). template ParseContext Spawn(const char** start, T&&... args) { ParseContext spawned(depth_, false, start, std::forward(args)...);