Skip to content

Commit

Permalink
Fix typos (protocolbuffers#7050)
Browse files Browse the repository at this point in the history
  • Loading branch information
bwignall authored and rafi-kamal committed Jan 8, 2020
1 parent 3214d0b commit a104dff
Show file tree
Hide file tree
Showing 163 changed files with 254 additions and 254 deletions.
4 changes: 2 additions & 2 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@
* Introduce Proto C API.
* FindFileContainingSymbol in descriptor pool is now able to find field and enum values.
* 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.
* Added support for memoryview in python3 proto message parsing.
* Added MergeFrom for repeated scalar fields in c extension (pure python already has it)
Expand Down Expand Up @@ -428,7 +428,7 @@
PHP
* Fixed memory leak in C-extension implementation.
* 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).
* Fixed Any.php to use fully-qualified name for DescriptorPool.

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ $ ./cpp-benchmark $(specific generated dataset file name) [$(benchmark options)]

### 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:

Expand Down
6 changes: 3 additions & 3 deletions conformance/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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
conformance_test_runner_CPPFLAGS = -I$(top_srcdir)/src -I$(srcdir)
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.
conformance_test_runner-conformance_test.$(OBJEXT): conformance.pb.h
conformance_test_runner-conformance_test_runner.$(OBJEXT): conformance.pb.h
Expand All @@ -227,7 +227,7 @@ conformance_cpp_LDADD = $(top_srcdir)/src/libprotobuf.la
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
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.
conformance_cpp-conformance_cpp.$(OBJEXT): conformance.pb.h

Expand All @@ -243,7 +243,7 @@ nodist_conformance_objc_SOURCES = Conformance.pbobjc.m google/protobuf/TestMessa
# 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_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.
conformance_objc-conformance_objc.$(OBJEXT): Conformance.pbobjc.h google/protobuf/TestMessagesProto2.pbobjc.h google/protobuf/TestMessagesProto3.pbobjc.h

Expand Down
8 changes: 4 additions & 4 deletions conformance/binary_json_conformance_suite.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1973,7 +1973,7 @@ void BinaryAndJsonConformanceSuite::RunJsonTestsForNonRepeatedTypes() {
ExpectParseFailureForJson(
"Uint64FieldNotNumber", REQUIRED,
R"({"optionalUint64": "3x3"})");
// JSON does not allow "+" on numric values.
// JSON does not allow "+" on numeric values.
ExpectParseFailureForJson(
"Int32FieldPlusSign", REQUIRED,
R"({"optionalInt32": +1})");
Expand Down Expand Up @@ -2080,7 +2080,7 @@ void BinaryAndJsonConformanceSuite::RunJsonTestsForNonRepeatedTypes() {
"FloatFieldNegativeInfinity", REQUIRED,
R"({"optionalFloat": "-Infinity"})",
"optional_float: -inf");
// Non-cannonical Nan will be correctly normalized.
// Non-canonical Nan will be correctly normalized.
{
TestAllTypesProto3 message;
// IEEE floating-point standard 32-bit quiet NaN:
Expand Down Expand Up @@ -2139,7 +2139,7 @@ void BinaryAndJsonConformanceSuite::RunJsonTestsForNonRepeatedTypes() {
"DoubleFieldQuotedValue", REQUIRED,
R"({"optionalDouble": "1"})",
"optional_double: 1");
// Speical values.
// Special values.
RunValidJsonTest(
"DoubleFieldNan", REQUIRED,
R"({"optionalDouble": "NaN"})",
Expand All @@ -2152,7 +2152,7 @@ void BinaryAndJsonConformanceSuite::RunJsonTestsForNonRepeatedTypes() {
"DoubleFieldNegativeInfinity", REQUIRED,
R"({"optionalDouble": "-Infinity"})",
"optional_double: -inf");
// Non-cannonical Nan will be correctly normalized.
// Non-canonical Nan will be correctly normalized.
{
TestAllTypesProto3 message;
message.set_optional_double(
Expand Down
4 changes: 2 additions & 2 deletions conformance/conformance.proto
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ message ConformanceRequest {
string message_type = 4;

// 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.
TestCategory test_category = 5;

Expand Down Expand Up @@ -170,7 +170,7 @@ message ConformanceResponse {

// Encoding options for jspb format.
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;
}

2 changes: 1 addition & 1 deletion conformance/conformance_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ class ConformanceTestSuite {
// Test cases are classified into a few categories:
// REQUIRED: the test case must be passed for an implementation to be
// 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.
// RECOMMENDED: the test case is not required for the implementation to
// be interoperable with other implementations, but is
Expand Down
6 changes: 3 additions & 3 deletions conformance/third_party/jsoncpp/json.h
Original file line number Diff line number Diff line change
Expand Up @@ -1019,7 +1019,7 @@ class JSON_API PathArgument {
* - ".name1.name2.name3"
* - ".[0][1][2].name1[3]"
* - ".%" => member name is provided as parameter
* - ".[%]" => index is provied as parameter
* - ".[%]" => index is provided as parameter
*/
class JSON_API Path {
public:
Expand Down Expand Up @@ -1371,7 +1371,7 @@ class JSON_API Reader {
*/
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
* only one error can be returned, but the caller should tolerate
* multiple
Expand Down Expand Up @@ -1816,7 +1816,7 @@ class JSON_API Writer {
*
* The JSON document is written in a single line. It is not intended for 'human'
*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
* \deprecated Use StreamWriterBuilder.
*/
Expand Down
2 changes: 1 addition & 1 deletion conformance/third_party/jsoncpp/jsoncpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4112,7 +4112,7 @@ std::string valueToString(double value, bool useSpecialFloats, unsigned int prec
sprintf(formatString, "%%.%dg", precision);

// 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.
if (isfinite(value)) {
len = snprintf(buffer, sizeof(buffer), formatString, value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ message TestAllTypes {
}
}

// This proto includes a recusively nested message.
// This proto includes a recursively nested message.
message NestedTestAllTypes {
NestedTestAllTypes child = 1;
TestAllTypes payload = 2;
Expand Down
2 changes: 1 addition & 1 deletion csharp/compatibility_tests/v3.0.0/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ TEST_VERSION=3.0.0
# 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
# 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.
OLD_VERSION=$1
OLD_VERSION_PROTOC=http://repo1.maven.org/maven2/com/google/protobuf/protoc/$OLD_VERSION/protoc-$OLD_VERSION-linux-x86_64.exe
Expand Down
2 changes: 1 addition & 1 deletion csharp/protos/unittest.proto
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ message TestAllTypes {
}
}

// This proto includes a recusively nested message.
// This proto includes a recursively nested message.
message NestedTestAllTypes {
optional NestedTestAllTypes child = 1;
optional TestAllTypes payload = 2;
Expand Down
2 changes: 1 addition & 1 deletion csharp/protos/unittest_custom_options_proto3.proto
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ message Aggregate {
}

// 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.MessageOptions { Aggregate msgopt = 15480088; }
extend google.protobuf.FieldOptions { Aggregate fieldopt = 15481374; }
Expand Down
2 changes: 1 addition & 1 deletion csharp/protos/unittest_proto3.proto
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ message TestAllTypes {
}
}

// This proto includes a recusively nested message.
// This proto includes a recursively nested message.
message NestedTestAllTypes {
NestedTestAllTypes child = 1;
TestAllTypes payload = 2;
Expand Down
4 changes: 2 additions & 2 deletions csharp/src/Google.Protobuf.Conformance/Conformance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ public string MessageType {
private global::Conformance.TestCategory testCategory_ = global::Conformance.TestCategory.UnspecifiedTest;
/// <summary>
/// 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.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Expand Down Expand Up @@ -1110,7 +1110,7 @@ public JspbEncodingConfig Clone() {
public const int UseJspbArrayAnyFormatFieldNumber = 1;
private bool useJspbArrayAnyFormat_;
/// <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>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool UseJspbArrayAnyFormat {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1773,7 +1773,7 @@ public void MergeFrom(pb::CodedInputStream input) {
}

/// <summary>
/// This proto includes a recusively nested message.
/// This proto includes a recursively nested message.
/// </summary>
public sealed partial class NestedTestAllTypes : pb::IMessage<NestedTestAllTypes> {
private static readonly pb::MessageParser<NestedTestAllTypes> _parser = new pb::MessageParser<NestedTestAllTypes>(() => new NestedTestAllTypes());
Expand Down
2 changes: 1 addition & 1 deletion csharp/src/Google.Protobuf/ExtensionRegistry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public void Add(Extension extension)
}

/// <summary>
/// Adds the specified extensions to the reigstry
/// Adds the specified extensions to the registry
/// </summary>
public void AddRange(IEnumerable<Extension> extensions)
{
Expand Down
2 changes: 1 addition & 1 deletion csharp/src/Google.Protobuf/Reflection/ServiceDescriptor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public IList<MethodDescriptor> Methods
/// Finds a method by name.
/// </summary>
/// <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)
{
return File.DescriptorPool.FindSymbol<MethodDescriptor>(FullName + "." + name);
Expand Down
2 changes: 1 addition & 1 deletion examples/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ local_repository(
)

# 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.
local_repository(
name = "com_google_protobuf_javalite",
Expand Down
2 changes: 1 addition & 1 deletion java/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ library (without the util package).
are guaranteed for minor version releases if the user follows the guideline
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
details.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ message MethodDescriptorProto {
// * For options which will be published and used publicly by multiple
// independent entities, e-mail [email protected]
// 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
// 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ message Aggregate {
}

// 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.MessageOptions { optional Aggregate msgopt = 15480088; }
extend google.protobuf.FieldOptions { optional Aggregate fieldopt = 15481374; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ package protobuf_unittest_import;

option optimize_for = SPEED;

// Excercise the java_package option.
// Exercise the java_package option.
option java_package = "com.google.protobuf.test";

// Do not set a java_outer_classname here to verify that Proto2 works without
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ message MethodDescriptorProto {
// * For options which will be published and used publicly by multiple
// independent entities, e-mail [email protected]
// 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
// 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ message Aggregate {
}

// 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.MessageOptions { optional Aggregate msgopt = 15480088; }
extend google.protobuf.FieldOptions { optional Aggregate fieldopt = 15481374; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ package protobuf_unittest_import;

option optimize_for = SPEED;

// Excercise the java_package option.
// Exercise the java_package option.
option java_package = "com.google.protobuf.test";

// Do not set a java_outer_classname here to verify that Proto2 works without
Expand Down
2 changes: 1 addition & 1 deletion java/compatibility_tests/v2.5.0/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
# 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
# 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.
OLD_VERSION=$1
OLD_VERSION_PROTOC=https://repo1.maven.org/maven2/com/google/protobuf/protoc/$OLD_VERSION/protoc-$OLD_VERSION-linux-x86_64.exe
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public void testByteIterator() {
stillEqual = (iter.hasNext() && referenceBytes[i] == iter.nextByte());
}
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 {
iter.nextByte();
Expand Down Expand Up @@ -317,7 +317,7 @@ public void testNewInput_skip() throws IOException {
assertEquals("InputStream.skip(), no more input", 0, input.available());
assertEquals("InputStream.skip(), no more input", -1, input.read());
input.reset();
assertEquals("InputStream.reset() succeded",
assertEquals("InputStream.reset() succeeded",
stringSize - skipped1, input.available());
assertEquals("InputStream.reset(), read()",
stringUnderTest.byteAt(nearEndIndex) & 0xFF, input.read());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,7 @@ static int decodeExtension(
}
} else {
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) {
position = decodeVarint32(data, position, registers);
Object enumValue = extension.descriptor.getEnumType().findValueByNumber(registers.int1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ <UT, UB> UB parseExtension(
extensions.setField(extension.descriptor, value);
} else {
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) {
int number = reader.readInt32();
Object enumValue = extension.descriptor.getEnumType().findValueByNumber(number);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ protected void makeExtensionsImmutable() {
* TODO(xiaofeng): remove this after b/29368482 is fixed. We need to move this
* interface to AbstractMessage in order to versioning GeneratedMessage but
* 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 {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ protected void makeExtensionsImmutable() {
* TODO(xiaofeng): remove this after b/29368482 is fixed. We need to move this
* interface to AbstractMessage in order to versioning GeneratedMessageV3 but
* 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 {}

Expand Down Expand Up @@ -3086,7 +3086,7 @@ protected static <V> void serializeIntegerMapTo(
serializeMapTo(out, m, defaultEntry, fieldNumber);
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.
int[] keys = new int[m.size()];
int index = 0;
Expand Down Expand Up @@ -3142,7 +3142,7 @@ protected static <V> void serializeStringMapTo(
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.
String[] keys = new String[m.size()];
keys = m.keySet().toArray(keys);
Expand Down
Loading

0 comments on commit a104dff

Please sign in to comment.