Fix lots of spelling errors (#7751)

* Fix a typo

* Fix lots of spelling errors

* Fix a few more spelling mistakes

* s/parsable/parseable/

* Don't touch the third party files

* Cloneable is the preferred C# term

* Copyable is the preferred C++ term

* Revert "s/parsable/parseable/"

This reverts commit 534ecf7675.

* Revert unparseable->unparsable corrections
pull/7752/head^2
Peter Newman 2020-08-10 19:08:25 +01:00 committed by GitHub
parent 8d74659c7a
commit e2cc2de304
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
94 changed files with 136 additions and 136 deletions

2
.gitignore vendored
View File

@ -104,7 +104,7 @@ build_msvc
# needed to trigger "pod install" to rerun the preinstall commands.
Pods/
# Comformance test output
# Conformance test output
conformance/.libs/
conformance/com/
conformance/conformance-cpp

View File

@ -135,7 +135,7 @@ $ make go
### PHP
We have two version of php protobuf implemention: pure php, php with c extension. To run these version benchmark, you need to:
We have two version of php protobuf implementation: pure php, php with c extension. To run these version benchmark, you need to:
#### Pure PHP
```
$ make php

View File

@ -41,9 +41,9 @@ process.argv.forEach(function(filename, index) {
totalBytes += onePayload.length;
});
var senarios = benchmarkSuite.newBenchmark(
var scenarios = benchmarkSuite.newBenchmark(
benchmarkDataset.getMessageName(), filename, "js");
senarios.suite
scenarios.suite
.add("js deserialize", function() {
benchmarkDataset.getPayloadList().forEach(function(onePayload) {
var protoType = getNewPrototype(benchmarkDataset.getMessageName());
@ -61,15 +61,15 @@ process.argv.forEach(function(filename, index) {
results.push({
filename: filename,
benchmarks: {
protobufjs_decoding: senarios.benches[0] * totalBytes / 1024 / 1024,
protobufjs_encoding: senarios.benches[1] * totalBytes / 1024 / 1024
protobufjs_decoding: scenarios.benches[0] * totalBytes / 1024 / 1024,
protobufjs_encoding: scenarios.benches[1] * totalBytes / 1024 / 1024
}
})
console.log("Throughput for deserialize: "
+ senarios.benches[0] * totalBytes / 1024 / 1024 + "MB/s" );
+ scenarios.benches[0] * totalBytes / 1024 / 1024 + "MB/s" );
console.log("Throughput for serialize: "
+ senarios.benches[1] * totalBytes / 1024 / 1024 + "MB/s" );
+ scenarios.benches[1] * totalBytes / 1024 / 1024 + "MB/s" );
console.log("");
});
console.log("#####################################################");

View File

@ -31,9 +31,9 @@ process.argv.forEach(function(filename, index) {
totalBytes += onePayload.length;
});
var senarios = benchmarkSuite.newBenchmark(
var scenarios = benchmarkSuite.newBenchmark(
benchmarkDataset.messageName, filename, "protobufjs");
senarios.suite
scenarios.suite
.add("protobuf.js static decoding", function() {
benchmarkDataset.payload.forEach(function(onePayload) {
var protoType = getNewPrototype(benchmarkDataset.messageName);
@ -51,15 +51,15 @@ process.argv.forEach(function(filename, index) {
results.push({
filename: filename,
benchmarks: {
protobufjs_decoding: senarios.benches[0] * totalBytes,
protobufjs_encoding: senarios.benches[1] * totalBytes
protobufjs_decoding: scenarios.benches[0] * totalBytes,
protobufjs_encoding: scenarios.benches[1] * totalBytes
}
})
console.log("Throughput for decoding: "
+ senarios.benches[0] * totalBytes / 1024 / 1024 + "MB/s" );
+ scenarios.benches[0] * totalBytes / 1024 / 1024 + "MB/s" );
console.log("Throughput for encoding: "
+ senarios.benches[1] * totalBytes / 1024 / 1024 + "MB/s" );
+ scenarios.benches[1] * totalBytes / 1024 / 1024 + "MB/s" );
console.log("");
});
console.log("#####################################################");

View File

@ -29,7 +29,7 @@ else()
endif()
# The Intel compiler isn't able to deal with noinline member functions of
# template classses defined in headers. As such it spams the output with
# template classes defined in headers. As such it spams the output with
# warning #2196: routine is both "inline" and "noinline"
# This silences that warning.
if (CMAKE_CXX_COMPILER_ID MATCHES Intel)

View File

@ -2,6 +2,6 @@
option(protobuf_VERBOSE "Enable for verbose output" OFF)
mark_as_advanced(protobuf_VERBOSE)
# FindProtobuf module compatibel
option(protobuf_MODULE_COMPATIBLE "CMake build-in FindProtobuf.cmake module compatible" OFF)
# FindProtobuf module compatible
option(protobuf_MODULE_COMPATIBLE "CMake built-in FindProtobuf.cmake module compatible" OFF)
mark_as_advanced(protobuf_MODULE_COMPATIBLE)

View File

@ -64,7 +64,7 @@ enum TestCategory {
BINARY_TEST = 1; // Test binary wire format.
JSON_TEST = 2; // Test json wire format.
// Similar to JSON_TEST. However, during parsing json, testee should ignore
// unknown fields. This feature is optional. Each implementation can descide
// unknown fields. This feature is optional. Each implementation can decide
// whether to support it. See
// https://developers.google.com/protocol-buffers/docs/proto3#json_options
// for more detail.
@ -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 definition of TestCategory
// specific support in testee programs. Refer to the definition of TestCategory
// for more information.
TestCategory test_category = 5;

View File

@ -1371,7 +1371,7 @@ public:
*/
std::string getFormattedErrorMessages() const;
/** \brief Returns a vector of structured errors encounted while parsing.
/** \brief Returns a vector of structured errors encountered while parsing.
* \return A (possibly empty) vector of StructuredError objects. Currently
* only one error can be returned, but the caller should tolerate
* multiple
@ -1867,7 +1867,7 @@ private:
* - otherwise, it the values do not fit on one line, or the array contains
* object or non empty array, then print one value per line.
*
* If the Value have comments then they are outputed according to their
* If the Value have comments then they are outputted according to their
*#CommentPlacement.
*
* \sa Reader, Value, Value::setComment()
@ -1928,7 +1928,7 @@ private:
* - otherwise, it the values do not fit on one line, or the array contains
* object or non empty array, then print one value per line.
*
* If the Value have comments then they are outputed according to their
* If the Value have comments then they are outputted according to their
#CommentPlacement.
*
* \param indentation Each level will be indented by this amount extra.

View File

@ -142,7 +142,7 @@ enum {
typedef char UIntToStringBuffer[uintToStringBufferSize];
/** Converts an unsigned integer to string.
* @param value Unsigned interger to convert to string
* @param value Unsigned integer to convert to string
* @param current Input/Output string buffer.
* Must have at least uintToStringBufferSize chars free.
*/

View File

@ -37,7 +37,7 @@ namespace Google.Protobuf.Examples.AddressBook
/// <summary>
/// Entry point. Repeatedly prompts user for an action to take, delegating actual behaviour
/// to individual actions. Each action has its own Main method, so that it can be used as an
/// invidual complete program.
/// individual complete program.
/// </summary>
internal class Program
{

View File

@ -82,7 +82,7 @@ namespace Conformance {
[pbr::OriginalName("JSON_TEST")] JsonTest = 2,
/// <summary>
/// Similar to JSON_TEST. However, during parsing json, testee should ignore
/// unknown fields. This feature is optional. Each implementation can descide
/// unknown fields. This feature is optional. Each implementation can decide
/// whether to support it. See
/// https://developers.google.com/protocol-buffers/docs/proto3#json_options
/// for more detail.
@ -414,7 +414,7 @@ namespace Conformance {
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 definition of TestCategory
/// specific support in testee programs. Refer to the definition of TestCategory
/// for more information.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]

View File

@ -60,7 +60,7 @@ namespace Google.Protobuf.Buffers
}
/// <summary>
/// Userful for testing writing to buffer writer with a lot of small segments.
/// Useful for testing writing to buffer writer with a lot of small segments.
/// If set, it limits the max number of bytes by which the buffer grows by at once.
/// </summary>
public int? MaxGrowBy { get; set; }

View File

@ -108,7 +108,7 @@ namespace Google.Protobuf
// we still must read the tag correctly, even though the tag is at the very end of our limited input
// (which is a corner case and will most likely result in an error when trying to read value of the field
// decribed by this tag, but it would be a logical error not to read the tag that's actually present).
// described by this tag, but it would be a logical error not to read the tag that's actually present).
// See https://github.com/protocolbuffers/protobuf/pull/7289
cis.AssertNextTag(WireFormat.MakeTag(11, WireFormat.WireType.Varint));
}

View File

@ -269,7 +269,7 @@ namespace Google.Protobuf
}
/// <summary>
/// Retuns the byte at the given index.
/// Returns the byte at the given index.
/// </summary>
public byte this[int index]
{

View File

@ -652,7 +652,7 @@ namespace Google.Protobuf
/// <summary>
/// Called when buffer is empty to read more bytes from the
/// input. If <paramref name="mustSucceed"/> is true, RefillBuffer() gurantees that
/// input. If <paramref name="mustSucceed"/> is true, RefillBuffer() guarantees that
/// either there will be at least one byte in the buffer when it returns
/// or it will throw an exception. If <paramref name="mustSucceed"/> is false,
/// RefillBuffer() returns false if no more bytes were available.

View File

@ -63,7 +63,7 @@ namespace Google.Protobuf.Reflection
internal static OneofAccessor ForSyntheticOneof(OneofDescriptor descriptor)
{
// Note: descriptor.Fields will be null when this method is called, because we haven't
// cross-linked yet. But by the time the delgates are called by user code, all will be
// cross-linked yet. But by the time the delegates are called by user code, all will be
// well. (That's why we capture the descriptor itself rather than a field.)
return new OneofAccessor(descriptor,
message => descriptor.Fields[0].Accessor.HasValue(message) ? descriptor.Fields[0].FieldNumber : 0,

View File

@ -918,7 +918,7 @@ namespace Google.Protobuf.WellKnownTypes {
/// The mixin construct implies that all methods in `AccessControl` are
/// also declared with same name and request/response types in
/// `Storage`. A documentation generator or annotation processor will
/// see the effective `Storage.GetAcl` method after inherting
/// see the effective `Storage.GetAcl` method after inheriting
/// documentation and annotations as follows:
///
/// service Storage {

View File

@ -97,7 +97,7 @@ foo.GetOrInitializeExtension(RepeatedFooExt).Add(new Baz());
### Message initialization
Initialization refers to checking the status of required fields in a proto2 message. If a message is uninitialized, not all required fields are set in either the message itself or any of its submessages. In other languages, missing required fields throw errors depending on the merge method used. This could cause unforseen errors at runtime if the incorrect method is used.
Initialization refers to checking the status of required fields in a proto2 message. If a message is uninitialized, not all required fields are set in either the message itself or any of its submessages. In other languages, missing required fields throw errors depending on the merge method used. This could cause unforeseen errors at runtime if the incorrect method is used.
However, in this implementation, parsers and input streams don't check messages for initialization on their own and throw errors. Instead it's up to you to handle messages with missing required fields in whatever way you see fit.
Checking message initialization can be done manually via the `IsInitialized` extension method in `MessageExtensions`.

View File

@ -127,7 +127,7 @@ The _no presence_ serialization discipline results in visible differences from t
### Considerations for merging
Under the _no presence_ rules, it is effectively impossible for a target field to merge-from its default value (using the protobuf's API merging functions). This is because default values are skipped, simliar to the _no presence_ serialization discipline. Merging only updates the target (merged-to) message using the non-skipped values from the update (merged-from) message.
Under the _no presence_ rules, it is effectively impossible for a target field to merge-from its default value (using the protobuf's API merging functions). This is because default values are skipped, similar to the _no presence_ serialization discipline. Merging only updates the target (merged-to) message using the non-skipped values from the update (merged-from) message.
The difference in merging behavior has further implications for protocols which rely on partial "patch" updates. If field presence is not tracked, then an update patch alone cannot represent an update to the default value, because only non-default values are merged-from.

View File

@ -13,7 +13,7 @@ optional fields. First-party code generators developed by Google are being
updated already. However third-party code generators will need to be updated
independently by their authors. This includes:
- implementations of Protocol Buffers for other languges.
- implementations of Protocol Buffers for other languages.
- alternate implementations of Protocol Buffers that target specialized use
cases.
- RPC code generators that create generated APIs for service calls.

View File

@ -68,7 +68,7 @@ how to use them.
Most users should follow the instructions above to use protobuf Java runtime.
If you are contributing code to protobuf or want to use a protobuf version
that hasn't been officially released yet, you can folllow the instructions
that hasn't been officially released yet, you can follow the instructions
below to build protobuf from source code.
### Build from Source - With Maven

View File

@ -74,7 +74,7 @@ message FileDescriptorProto {
optional FileOptions options = 8;
// This field contains optional information about the original source code.
// You may safely remove this entire field whithout harming runtime
// You may safely remove this entire field without harming runtime
// functionality of the descriptors -- the information is needed only by
// development tools.
optional SourceCodeInfo source_code_info = 9;

View File

@ -74,7 +74,7 @@ message FileDescriptorProto {
optional FileOptions options = 8;
// This field contains optional information about the original source code.
// You may safely remove this entire field whithout harming runtime
// You may safely remove this entire field without harming runtime
// functionality of the descriptors -- the information is needed only by
// development tools.
optional SourceCodeInfo source_code_info = 9;

View File

@ -39,7 +39,7 @@ import java.io.IOException;
* Helper functions to decode protobuf wire format from a byte array.
*
* <p>Note that these functions don't do boundary check on the byte array but instead rely on Java
* VM to check it. That means parsing rountines utilizing these functions must catch
* VM to check it. That means parsing routines utilizing these functions must catch
* IndexOutOfBoundsException and convert it to protobuf's InvalidProtocolBufferException when
* crossing protobuf public API boundaries.
*/
@ -51,7 +51,7 @@ final class ArrayDecoders {
* multiple values and let the function set the return value in this Registers instance instead.
*
* <p>TODO(xiaofeng): This could be merged into CodedInputStream or CodedInputStreamReader which
* is already being passed through all the parsing rountines.
* is already being passed through all the parsing routines.
*/
static final class Registers {
public int int1;

View File

@ -1084,7 +1084,7 @@ public final class Descriptors {
/**
* Does this field have the {@code [packed = true]} option or is this field packable in proto3
* and not explicitly setted to unpacked?
* and not explicitly set to unpacked?
*/
@Override
public boolean isPacked() {

View File

@ -223,7 +223,7 @@ public abstract class GeneratedMessageLite<
/**
* A method that implements different types of operations described in {@link MethodToInvoke}.
* Theses different kinds of operations are required to implement message-level operations for
* These different kinds of operations are required to implement message-level operations for
* builders in the runtime. This method bundles those operations to reduce the generated methods
* count.
*

View File

@ -192,7 +192,7 @@ public class MapEntryLite<K, V> {
}
/**
* Parses an entry off of the input into the map. This helper avoids allocaton of a {@link
* Parses an entry off of the input into the map. This helper avoids allocation of a {@link
* MapEntryLite} by parsing directly into the provided {@link MapFieldLite}.
*/
public void parseInto(

View File

@ -258,7 +258,7 @@ jspb.utils.splitFloat64 = function(value) {
// Compute the least significant exponent needed to represent the magnitude of
// the value by repeadly dividing/multiplying by 2 until the magnitude
// crosses 2. While tempting to use log math to find the exponent, at the
// bounadaries of precision, the result can be off by one.
// boundaries of precision, the result can be off by one.
var maxDoubleExponent = 1023;
var minDoubleExponent = -1022;
var x = value;

View File

@ -699,7 +699,7 @@ describe('Bytes access', () => {
expect(accessor.getBytesWithDefault(1)).toEqual(simpleByteString);
});
it('decodes value from wire with multple values being present', () => {
it('decodes value from wire with multiple values being present', () => {
const accessor = Kernel.fromArrayBuffer(
createArrayBuffer(0x0A, 0x01, 0x00, 0x0A, 0x01, 0x01));
expect(accessor.getBytesWithDefault(1)).toEqual(simpleByteString);
@ -801,7 +801,7 @@ describe('Fixed32 access', () => {
expect(accessor.getFixed32WithDefault(1)).toEqual(1);
});
it('decodes value from wire with multple values being present', () => {
it('decodes value from wire with multiple values being present', () => {
const accessor = Kernel.fromArrayBuffer(createArrayBuffer(
0x0D, 0x01, 0x00, 0x80, 0x00, 0x0D, 0x02, 0x00, 0x00, 0x00));
expect(accessor.getFixed32WithDefault(1)).toEqual(2);
@ -909,7 +909,7 @@ describe('Fixed64 access', () => {
expect(accessor.getFixed64WithDefault(1)).toEqual(Int64.fromInt(1));
});
it('decodes value from wire with multple values being present', () => {
it('decodes value from wire with multiple values being present', () => {
const accessor = Kernel.fromArrayBuffer(createArrayBuffer(
0x09, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x02, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00));
@ -1008,7 +1008,7 @@ describe('Float access', () => {
expect(accessor.getFloatWithDefault(1)).toEqual(1);
});
it('decodes value from wire with multple values being present', () => {
it('decodes value from wire with multiple values being present', () => {
const accessor = Kernel.fromArrayBuffer(createArrayBuffer(
0x0D, 0x00, 0x00, 0x80, 0x3F, 0x0D, 0x00, 0x00, 0x80, 0xBF));
expect(accessor.getFloatWithDefault(1)).toEqual(-1);
@ -1110,7 +1110,7 @@ describe('Int32 access', () => {
expect(accessor.getInt32WithDefault(1)).toEqual(1);
});
it('decodes value from wire with multple values being present', () => {
it('decodes value from wire with multiple values being present', () => {
const accessor =
Kernel.fromArrayBuffer(createArrayBuffer(0x08, 0x01, 0x08, 0x02));
expect(accessor.getInt32WithDefault(1)).toEqual(2);
@ -1207,7 +1207,7 @@ describe('Int64 access', () => {
expect(accessor.getInt64WithDefault(1)).toEqual(Int64.fromInt(1));
});
it('decodes value from wire with multple values being present', () => {
it('decodes value from wire with multiple values being present', () => {
const accessor =
Kernel.fromArrayBuffer(createArrayBuffer(0x08, 0x01, 0x08, 0x02));
expect(accessor.getInt64WithDefault(1)).toEqual(Int64.fromInt(2));
@ -1306,7 +1306,7 @@ describe('Sfixed32 access', () => {
expect(accessor.getSfixed32WithDefault(1)).toEqual(1);
});
it('decodes value from wire with multple values being present', () => {
it('decodes value from wire with multiple values being present', () => {
const accessor = Kernel.fromArrayBuffer(createArrayBuffer(
0x0D, 0x01, 0x00, 0x80, 0x00, 0x0D, 0x02, 0x00, 0x00, 0x00));
expect(accessor.getSfixed32WithDefault(1)).toEqual(2);
@ -1404,7 +1404,7 @@ describe('Sfixed64 access', () => {
expect(accessor.getSfixed64WithDefault(1)).toEqual(Int64.fromInt(1));
});
it('decodes value from wire with multple values being present', () => {
it('decodes value from wire with multiple values being present', () => {
const accessor = Kernel.fromArrayBuffer(createArrayBuffer(
0x09, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x02, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00));
@ -1502,7 +1502,7 @@ describe('Sint32 access', () => {
expect(accessor.getSint32WithDefault(1)).toEqual(1);
});
it('decodes value from wire with multple values being present', () => {
it('decodes value from wire with multiple values being present', () => {
const accessor =
Kernel.fromArrayBuffer(createArrayBuffer(0x08, 0x03, 0x08, 0x02));
expect(accessor.getSint32WithDefault(1)).toEqual(1);
@ -1599,7 +1599,7 @@ describe('SInt64 access', () => {
expect(accessor.getSint64WithDefault(1)).toEqual(Int64.fromInt(1));
});
it('decodes value from wire with multple values being present', () => {
it('decodes value from wire with multiple values being present', () => {
const accessor =
Kernel.fromArrayBuffer(createArrayBuffer(0x08, 0x01, 0x08, 0x02));
expect(accessor.getSint64WithDefault(1)).toEqual(Int64.fromInt(1));
@ -1698,7 +1698,7 @@ describe('String access', () => {
expect(accessor.getStringWithDefault(1)).toEqual('a');
});
it('decodes value from wire with multple values being present', () => {
it('decodes value from wire with multiple values being present', () => {
const accessor = Kernel.fromArrayBuffer(
createArrayBuffer(0x0A, 0x01, 0x60, 0x0A, 0x01, 0x61));
expect(accessor.getStringWithDefault(1)).toEqual('a');
@ -1789,7 +1789,7 @@ describe('Uint32 access', () => {
expect(accessor.getUint32WithDefault(1)).toEqual(1);
});
it('decodes value from wire with multple values being present', () => {
it('decodes value from wire with multiple values being present', () => {
const accessor =
Kernel.fromArrayBuffer(createArrayBuffer(0x08, 0x01, 0x08, 0x02));
expect(accessor.getUint32WithDefault(1)).toEqual(2);
@ -1896,7 +1896,7 @@ describe('Uint64 access', () => {
expect(accessor.getUint64WithDefault(1)).toEqual(Int64.fromInt(1));
});
it('decodes value from wire with multple values being present', () => {
it('decodes value from wire with multiple values being present', () => {
const accessor =
Kernel.fromArrayBuffer(createArrayBuffer(0x08, 0x01, 0x08, 0x02));
expect(accessor.getUint64WithDefault(1)).toEqual(Int64.fromInt(2));
@ -1996,7 +1996,7 @@ describe('Double access', () => {
});
it('decodes value from wire with multple values being present', () => {
it('decodes value from wire with multiple values being present', () => {
const accessor = Kernel.fromArrayBuffer(createArrayBuffer(
0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x3F, 0x09, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xF0, 0xBF));

View File

@ -95,12 +95,12 @@ describe('skipField', () => {
it('skips group in group', () => {
const buffer = createArrayBuffer(
0x0B, // start outter
0x0B, // start outer
0x10, 0x01, // field: 2, value: 1
0x0B, // start inner group
0x10, 0x01, // payload inner group
0x0C, // stop inner group
0x0C // end outter
0x0C // end outer
);
const bufferDecoder = BufferDecoder.fromArrayBuffer(buffer);
bufferDecoder.setCursor(1);

View File

@ -39,7 +39,7 @@ cp ${INPUT_ARTIFACTS_DIR}/build64/Release/protoc.exe protoc/windows_x64/protoc.e
mkdir -p protoc/linux_x86
mkdir -p protoc/linux_x64
# Because of maven unrelated reasonse the linux protoc binaries have a dummy .exe extension.
# For the Google.Protobuf.Tools nuget, we don't want that expection, so we just remove it.
# For the Google.Protobuf.Tools nuget, we don't want that exception, so we just remove it.
cp ${INPUT_ARTIFACTS_DIR}/protoc-artifacts/target/linux/x86_32/protoc.exe protoc/linux_x86/protoc
cp ${INPUT_ARTIFACTS_DIR}/protoc-artifacts/target/linux/x86_64/protoc.exe protoc/linux_x64/protoc

View File

@ -95,7 +95,7 @@ cd "${SRCROOT}/.."
# -----------------------------------------------------------------------------
RUN_PROTOC=no
# Check to if all the output files exist (incase a new one got added).
# Check to if all the output files exist (in case a new one got added).
for PROTO_FILE in "${CORE_PROTO_FILES[@]}" "${OBJC_TEST_PROTO_FILES[@]}"; do
DIR=${PROTO_FILE%/*}

View File

@ -285,7 +285,7 @@ if [[ "${DO_XCODE_IOS_TESTS}" == "yes" ]] ; then
-destination "platform=iOS Simulator,name=iPhone 4s,OS=8.1" # 32bit
-destination "platform=iOS Simulator,name=iPhone 7,OS=latest" # 64bit
# 10.x also seems to often fail running destinations in parallel (with
# 32bit one include atleast)
# 32bit one include at least)
-disable-concurrent-destination-testing
)
;;

View File

@ -645,7 +645,7 @@ def main(args):
opts, extra_args = parser.parse_args(args)
if not extra_args:
parser.error('Need atleast one file to process')
parser.error('Need at least one file to process')
result = 0
for a_path in extra_args:

View File

@ -257,7 +257,7 @@ typedef GPB_ENUM(GPBMixin_FieldNumber) {
* The mixin construct implies that all methods in `AccessControl` are
* also declared with same name and request/response types in
* `Storage`. A documentation generator or annotation processor will
* see the effective `Storage.GetAcl` method after inherting
* see the effective `Storage.GetAcl` method after inheriting
* documentation and annotations as follows:
*
* service Storage {

View File

@ -361,8 +361,8 @@ static id NewSingleValueFromInputStream(GPBExtensionDescriptor *extension,
if (existingValue) {
message = [existingValue retain];
} else {
GPBDescriptor *decriptor = [extension.msgClass descriptor];
message = [[decriptor.messageClass alloc] init];
GPBDescriptor *descriptor = [extension.msgClass descriptor];
message = [[descriptor.messageClass alloc] init];
}
if (description->dataType == GPBDataTypeGroup) {

View File

@ -3286,7 +3286,7 @@ static void ResolveIvarSet(__unsafe_unretained GPBFieldDescriptor *field,
// if a sub message in a field has extensions, the issue still exists. A
// recursive check could be done here (like the work in
// GPBMessageDropUnknownFieldsRecursively()), but that has the potential to
// be expensive and could slow down serialization in DEBUG enought to cause
// be expensive and could slow down serialization in DEBUG enough to cause
// developers other problems.
NSLog(@"Warning: writing out a GPBMessage (%@) via NSCoding and it"
@" has %ld extensions; when read back in, those fields will be"

View File

@ -219,7 +219,7 @@ void GPBCheckRuntimeVersionSupport(int32_t objcRuntimeVersion) {
// Library is too old for headers.
[NSException raise:NSInternalInconsistencyException
format:@"Linked to ProtocolBuffer runtime version %d,"
@" but code compiled needing atleast %d!",
@" but code compiled needing at least %d!",
GOOGLE_PROTOBUF_OBJC_VERSION, objcRuntimeVersion];
}
if (objcRuntimeVersion < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION) {

View File

@ -304,7 +304,7 @@ void GPBClearAutocreatedMessageIvarWithField(GPBMessage *self,
const char *GPBMessageEncodingForSelector(SEL selector, BOOL instanceSel);
// Helper for text format name encoding.
// decodeData is the data describing the sepecial decodes.
// decodeData is the data describing the special decodes.
// key and inputString are the input that needs decoding.
NSString *GPBDecodeTextFormatName(const uint8_t *decodeData, int32_t key,
NSString *inputString);

View File

@ -168,7 +168,7 @@ supported keys are:
Any number of files can be listed for a framework, just separate them with
commas.
There can be multiple lines listing the same frameworkName incase it has a
There can be multiple lines listing the same frameworkName in case it has a
lot of proto files included in it; and having multiple lines makes things
easier to read.

View File

@ -90,7 +90,7 @@ cleanup() {
echo "Cleaning up..."
# Generally don't let things fail, and eat common stdout, but let stderr show
# incase something does hiccup.
# in case something does hiccup.
xcodebuild -workspace "${TEST_NAME}.xcworkspace" -scheme "${TEST_NAME}" clean > /dev/null || true
pod deintegrate > /dev/null || true
# Flush the cache so nothing is left behind.

View File

@ -422,7 +422,7 @@
- (void)testBOMWithinStrings {
// We've seen servers that end up with BOMs within strings (not always at the
// start, and sometimes in multiple places), make sure they always parse
// correctly. (Again, this is inpart incase a custom string class is ever
// correctly. (Again, this is inpart in case a custom string class is ever
// used again.)
const char* strs[] = {
"\xEF\xBB\xBF String with BOM",

View File

@ -400,7 +400,7 @@
- (void)testWriteStringsWithZeroChar {
// Unicode allows `\0` as a character, and NSString is a class cluster, so
// there are a few different classes that could end up beind a given string.
// there are a few different classes that could end up behind a given string.
// Historically, we've seen differences based on constant strings in code and
// strings built via the NSString apis. So this round trips them to ensure
// they are acting as expected.

View File

@ -208,7 +208,7 @@ int msvc_vsnprintf(char* s, size_t n, const char* format, va_list arg);
** store pointers or integers of at least 32 bits (upb isn't really useful on
** systems where sizeof(void*) < 4).
**
** The table must be homogenous (all values of the same type). In debug
** The table must be homogeneous (all values of the same type). In debug
** mode, we check this on insert and lookup.
*/
@ -3831,7 +3831,7 @@ extern "C" {
#endif
enum {
/* When set, emits 0/default values. TOOD(haberman): proto3 only? */
/* When set, emits 0/default values. TODO(haberman): proto3 only? */
UPB_JSONENC_EMITDEFAULTS = 1,
/* When set, use normal (snake_caes) field names instead of JSON (camelCase)

View File

@ -46,7 +46,7 @@ use Google\Protobuf\Internal\GPBUtil;
* The mixin construct implies that all methods in `AccessControl` are
* also declared with same name and request/response types in
* `Storage`. A documentation generator or annotation processor will
* see the effective `Storage.GetAcl` method after inherting
* see the effective `Storage.GetAcl` method after inheriting
* documentation and annotations as follows:
* service Storage {
* // Get the underlying ACL object.

View File

@ -108,7 +108,7 @@ class DescriptorsTest extends TestBase
public function testEnumDescriptor()
{
// WARNINIG - we need to do this so that TestDescriptorsEnum is registered!!?
// WARNING - we need to do this so that TestDescriptorsEnum is registered!!?
new TestDescriptorsMessage();
$pool = DescriptorPool::getGeneratedPool();

View File

@ -55,7 +55,7 @@ valgrind --leak-check=yes php -dextension=../ext/google/protobuf/modules/protobu
valgrind --leak-check=yes php -d protobuf.keep_descriptor_pool_after_request=1 -dextension=../ext/google/protobuf/modules/protobuf.so memory_leak_test.php
# TODO(teboring): Only for debug (phpunit has memory leak which blocks this beging used by
# regresssion test.)
# regression test.)
# for t in "${tests[@]}"
# do

View File

@ -22,7 +22,7 @@ package.
Development Warning
===================
The pure python performance is slow. For better preformance please
The pure python performance is slow. For better performance please
use python c++ implementation.
Installation

View File

@ -74,7 +74,7 @@ message FileDescriptorProto {
optional FileOptions options = 8;
// This field contains optional information about the original source code.
// You may safely remove this entire field whithout harming runtime
// You may safely remove this entire field without harming runtime
// functionality of the descriptors -- the information is needed only by
// development tools.
optional SourceCodeInfo source_code_info = 9;

View File

@ -227,7 +227,7 @@ class _NestedDescriptorBase(DescriptorBase):
proto: An empty proto instance from descriptor_pb2.
Raises:
Error: If self couldnt be serialized, due to to few constructor arguments.
Error: If self couldn't be serialized, due to to few constructor arguments.
"""
if (self.file is not None and
self._serialized_start is not None and
@ -827,7 +827,7 @@ class ServiceDescriptor(_NestedDescriptorBase):
Args:
name (str): Name of the method.
Returns:
MethodDescriptor or None: the desctiptor for the requested method, if
MethodDescriptor or None: the descriptor for the requested method, if
found.
"""
return self.methods_by_name.get(name, None)

View File

@ -58,7 +58,7 @@ class DescriptorDatabase(object):
Raises:
DescriptorDatabaseConflictingDefinitionError: if an attempt is made to
add a proto with the same name but different definition than an
exisiting proto in the database.
existing proto in the database.
"""
proto_name = file_desc_proto.name
if proto_name not in self._file_desc_protos_by_file:

View File

@ -1064,7 +1064,7 @@ class JsonFormatTest(JsonFormatBase):
json_format.ParseError,
'Failed to parse value field: year (0 )?is out of range.',
json_format.Parse, text, message)
# Time bigger than maxinum time.
# Time bigger than maximum time.
message.value.seconds = 253402300800
self.assertRaisesRegexp(
OverflowError,

View File

@ -1059,7 +1059,7 @@ class MessageTest(unittest.TestCase):
self.assertIsInstance(m.optional_string, six.text_type)
def testLongValuedSlice(self, message_module):
"""It should be possible to use long-valued indicies in slices
"""It should be possible to use long-valued indices in slices
This didn't used to work in the v2 C++ implementation.
"""

View File

@ -2813,7 +2813,7 @@ class SerializationTest(unittest.TestCase):
proto2.MergeFromString(serialized))
def _CheckRaises(self, exc_class, callable_obj, exception):
"""This method checks if the excpetion type and message are as expected."""
"""This method checks if the exception type and message are as expected."""
try:
callable_obj()
except exc_class as ex:
@ -3267,7 +3267,7 @@ class ClassAPITest(unittest.TestCase):
# conflicting message descriptors.
def testParsingFlatClassWithExplicitClassDeclaration(self):
"""Test that the generated class can parse a flat message."""
# TODO(xiaofeng): This test fails with cpp implemetnation in the call
# TODO(xiaofeng): This test fails with cpp implementation in the call
# of six.with_metaclass(). The other two callsites of with_metaclass
# in this file are both excluded from cpp test, so it might be expected
# to fail. Need someone more familiar with the python code to take a

View File

@ -401,7 +401,7 @@ def _CheckDurationValid(seconds, nanos):
def _RoundTowardZero(value, divider):
"""Truncates the remainder part after division."""
# For some languanges, the sign of the remainder is implementation
# For some languages, the sign of the remainder is implementation
# dependent if any of the operands is negative. Here we enforce
# "rounded toward zero" semantics. For example, for (-5) / 2 an
# implementation may give -3 as the result with the remainder being

View File

@ -77,7 +77,7 @@ class ScopedPythonPtr {
PyObject* as_pyobject() const { return reinterpret_cast<PyObject*>(ptr_); }
// Increments the reference count fo the current object.
// Increments the reference count of the current object.
// Should not be called when no object is held.
void inc() const { Py_INCREF(ptr_); }

View File

@ -200,7 +200,7 @@ int msvc_vsnprintf(char* s, size_t n, const char* format, va_list arg);
** store pointers or integers of at least 32 bits (upb isn't really useful on
** systems where sizeof(void*) < 4).
**
** The table must be homogenous (all values of the same type). In debug
** The table must be homogeneous (all values of the same type). In debug
** mode, we check this on insert and lookup.
*/
@ -6057,7 +6057,7 @@ typedef struct {
typedef struct {
/* Space optimization note: we store two pointers here that the JIT
* 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
* to guarantee is that the fallback routines can find end_ofs. */
upb_sink sink;

View File

@ -169,7 +169,7 @@ message Method {
// The mixin construct implies that all methods in `AccessControl` are
// also declared with same name and request/response types in
// `Storage`. A documentation generator or annotation processor will
// see the effective `Storage.GetAcl` method after inherting
// see the effective `Storage.GetAcl` method after inheriting
// documentation and annotations as follows:
//
// service Storage {

View File

@ -84,7 +84,7 @@ class NoHeapChecker {
private:
class NewDeleteCapture {
public:
// TOOD(xiaofeng): Implement this for opensource protobuf.
// TODO(xiaofeng): Implement this for opensource protobuf.
void Hook() {}
void Unhook() {}
int alloc_count() { return 0; }

View File

@ -104,7 +104,7 @@ class DiskSourceTree; // importer.h
// 2. protoc --proto_path=src foo.proto (virtual path relative to src)
//
// If a file path can be interpreted both as a physical file path and as a
// relative virtual path, the physical file path takes precendence.
// relative virtual path, the physical file path takes precedence.
//
// For a full description of the command-line syntax, invoke it with --help.
class PROTOC_EXPORT CommandLineInterface {

View File

@ -113,7 +113,7 @@ class MessageGenerator {
bool GenerateParseTable(io::Printer* printer, size_t offset,
size_t aux_offset);
// Generate the field offsets array. Returns the a pair of the total numer
// Generate the field offsets array. Returns the a pair of the total number
// of entries generated and the index of the first has_bit entry.
std::pair<size_t, size_t> GenerateOffsets(io::Printer* printer);
void GenerateSchema(io::Printer* printer, int offset, int has_offset);

View File

@ -463,13 +463,13 @@ TEST_F(DiskSourceTreeTest, DiskFileToVirtualFileCanonicalization) {
source_tree_.DiskFileToVirtualFile("../../baz", &virtual_file,
&shadowing_disk_file));
// "/foo" is not mapped (it should not be misintepreted as being under ".").
// "/foo" is not mapped (it should not be misinterpreted as being under ".").
EXPECT_EQ(DiskSourceTree::NO_MAPPING,
source_tree_.DiskFileToVirtualFile("/foo", &virtual_file,
&shadowing_disk_file));
#ifdef WIN32
// "C:\foo" is not mapped (it should not be misintepreted as being under ".").
// "C:\foo" is not mapped (it should not be misinterpreted as being under ".").
EXPECT_EQ(DiskSourceTree::NO_MAPPING,
source_tree_.DiskFileToVirtualFile("C:\\foo", &virtual_file,
&shadowing_disk_file));

View File

@ -712,7 +712,7 @@ void RepeatedImmutableEnumFieldGenerator::GenerateBuilderMembers(
// list is immutable. If it's immutable, the invariant is that it must
// either an instance of Collections.emptyList() or it's an ArrayList
// wrapped in a Collections.unmodifiableList() wrapper and nobody else has
// a refererence to the underlying ArrayList. This invariant allows us to
// a reference to the underlying ArrayList. This invariant allows us to
// share instances of lists between protocol buffers avoiding expensive
// memory allocations. Note, immutable is a strong guarantee here -- not
// just that the list cannot be modified via the reference but that the

View File

@ -944,7 +944,7 @@ void RepeatedImmutableMessageFieldGenerator::GenerateBuilderMembers(
// list is immutable. If it's immutable, the invariant is that it must
// either an instance of Collections.emptyList() or it's an ArrayList
// wrapped in a Collections.unmodifiableList() wrapper and nobody else has
// a refererence to the underlying ArrayList. This invariant allows us to
// a reference to the underlying ArrayList. This invariant allows us to
// share instances of lists between protocol buffers avoiding expensive
// memory allocations. Note, immutable is a strong guarantee here -- not
// just that the list cannot be modified via the reference but that the

View File

@ -703,7 +703,7 @@ void RepeatedImmutablePrimitiveFieldGenerator::GenerateBuilderMembers(
// list is immutable. If it's immutable, the invariant is that it must
// either an instance of Collections.emptyList() or it's an ArrayList
// wrapped in a Collections.unmodifiableList() wrapper and nobody else has
// a refererence to the underlying ArrayList. This invariant allows us to
// a reference to the underlying ArrayList. This invariant allows us to
// share instances of lists between protocol buffers avoiding expensive
// memory allocations. Note, immutable is a strong guarantee here -- not
// just that the list cannot be modified via the reference but that the

View File

@ -801,7 +801,7 @@ void RepeatedImmutableStringFieldGenerator::GenerateBuilderMembers(
// list is immutable. If it's immutable, the invariant is that it must
// either an instance of Collections.emptyList() or it's an ArrayList
// wrapped in a Collections.unmodifiableList() wrapper and nobody else has
// a refererence to the underlying ArrayList. This invariant allows us to
// a reference to the underlying ArrayList. This invariant allows us to
// share instances of lists between protocol buffers avoiding expensive
// memory allocations. Note, immutable is a strong guarantee here -- not
// just that the list cannot be modified via the reference but that the

View File

@ -125,10 +125,10 @@ struct GeneratorOptions {
std::string extension;
// Create a separate output file for each input file?
bool one_output_file_per_input_file;
// If true, we should append annotations as commen on the last line for
// If true, we should append annotations as comments on the last line for
// generated .js file. Annotations used by tools like https://kythe.io
// to provide cross-references between .js and .proto files. Annotations
// are enced as base64 proto of GeneratedCodeInfo message (see
// are encoded as base64 proto of GeneratedCodeInfo message (see
// descriptor.proto).
bool annotate_code;
};

View File

@ -421,7 +421,7 @@ void FileGenerator::GenerateSource(io::Printer *printer) {
"#pragma clang diagnostic ignored \"-Wdeprecated-declarations\"\n");
if (includes_oneof) {
// The generated code for oneof's uses direct ivar access, suppress the
// warning incase developer turn that on in the context they compile the
// warning in case developer turn that on in the context they compile the
// generated code.
printer->Print(
"#pragma clang diagnostic ignored \"-Wdirect-ivar-access\"\n");

View File

@ -123,7 +123,7 @@ bool ObjectiveCGenerator::GenerateAll(const std::vector<const FileDescriptor*>&
// Any number of files can be listed for a framework, just separate them
// with commas.
//
// There can be multiple lines listing the same frameworkName incase it
// There can be multiple lines listing the same frameworkName in case it
// has a lot of proto files included in it; having multiple lines makes
// things easier to read. If a proto file is not configured in the
// mappings file, it will use the default framework name if one was passed

View File

@ -1067,7 +1067,7 @@ void Generator::FixContainingTypeInDescriptor(
}
// Prints statements setting the message_type and enum_type fields in the
// Python descriptor objects we've already output in ths file. We must
// Python descriptor objects we've already output in the file. We must
// do this in a separate step due to circular references (otherwise, we'd
// just set everything in the initial assignment statements).
void Generator::FixForeignFieldsInDescriptors() const {

View File

@ -413,7 +413,7 @@ int GeneratePackageModules(const FileDescriptor* file, io::Printer* printer) {
// If :: is in the package use the Ruby formatted name as-is
// -> A::B::C
// otherwise, use the dot seperator
// otherwise, use the dot separator
// -> A.B.C
if (package_name.find("::") != std::string::npos) {
need_change_to_module = false;

View File

@ -6131,7 +6131,7 @@ void DescriptorBuilder::ValidateFieldOptions(
// json_name option is not allowed on extension fields. Note that the
// json_name field in FieldDescriptorProto is always populated by protoc
// when it sends descriptor data to plugins (caculated from field name if
// when it sends descriptor data to plugins (calculated from field name if
// the option is not explicitly set) so we can't rely on its presence to
// determine whether the json_name option is set on the field. Here we
// compare it against the default calculated json_name value and consider

View File

@ -479,7 +479,7 @@ TEST_F(FileDescriptorTest, FindExtensionByNumber) {
TEST_F(FileDescriptorTest, BuildAgain) {
// Test that if te call BuildFile again on the same input we get the same
// Test that if we call BuildFile again on the same input we get the same
// FileDescriptor back.
FileDescriptorProto file;
foo_file_->CopyTo(&file);

View File

@ -102,7 +102,7 @@ struct PROTOBUF_EXPORT FieldMetadata {
kNumTypeClasses // must be last enum
};
// C++ protobuf has 20 fundamental types, were we added Cord and StringPiece
// and also distinquish the same types if they have different wire format.
// and also distinguish the same types if they have different wire format.
enum {
kCordType = 19,
kStringPieceType = 20,

View File

@ -960,7 +960,7 @@ class PROTOBUF_EXPORT EpsCopyOutputStream {
// buffers to ensure there is no error as of yet.
uint8* FlushAndResetBuffer(uint8*);
// The following functions mimick the old CodedOutputStream behavior as close
// The following functions mimic the old CodedOutputStream behavior as close
// as possible. They flush the current state to the stream, behave as
// the old CodedOutputStream and then return to normal operation.
bool Skip(int count, uint8** pp);
@ -1159,7 +1159,7 @@ class PROTOBUF_EXPORT CodedOutputStream {
// This is identical to WriteVarint32(), but optimized for writing tags.
// In particular, if the input is a compile-time constant, this method
// compiles down to a couple instructions.
// Always inline because otherwise the aformentioned optimization can't work,
// Always inline because otherwise the aforementioned optimization can't work,
// but GCC by default doesn't want to inline this.
void WriteTag(uint32 value);
// Like WriteTag() but writing directly to the target array.

View File

@ -112,7 +112,7 @@ class IoTest : public testing::Test {
// that it matches the string.
void ReadString(ZeroCopyInputStream* input, const std::string& str);
// Writes some text to the output stream in a particular order. Returns
// the number of bytes written, incase the caller needs that to set up an
// the number of bytes written, in case the caller needs that to set up an
// input stream.
int WriteStuff(ZeroCopyOutputStream* output);
// Reads text from an input stream and expects it to match what

View File

@ -385,7 +385,7 @@ class Map {
// 9. Except for erase(iterator), any non-const method can reorder iterators.
// 10. InnerMap uses KeyForTree<Key> when using the Tree representation, which
// is either `Key`, if Key is a scalar, or `reference_wrapper<const Key>`
// otherwise. This avoids unncessary copies of string keys, for example.
// otherwise. This avoids unnecessary copies of string keys, for example.
class InnerMap : private hasher {
public:
explicit InnerMap(size_type n) : InnerMap(nullptr, n) {}

View File

@ -272,7 +272,7 @@ class MapFieldAccessor;
// This class provides access to map field using reflection, which is the same
// as those provided for RepeatedPtrField<Message>. It is used for internal
// reflection implentation only. Users should never use this directly.
// reflection implementation only. Users should never use this directly.
class PROTOBUF_EXPORT MapFieldBase {
public:
MapFieldBase()
@ -421,7 +421,7 @@ class TypeDefinedMapFieldBase : public MapFieldBase {
};
// This class provides access to map field using generated api. It is used for
// internal generated message implentation only. Users should never use this
// internal generated message implementation only. Users should never use this
// directly.
template <typename Derived, typename Key, typename T,
WireFormatLite::FieldType kKeyFieldType,

View File

@ -50,7 +50,7 @@ namespace protobuf {
namespace internal {
// This class provides access to map field using generated api. It is used for
// internal generated message implentation only. Users should never use this
// internal generated message implementation only. Users should never use this
// directly.
template <typename Derived, typename Key, typename T,
WireFormatLite::FieldType key_wire_type,

View File

@ -3158,7 +3158,7 @@ TEST(WireFormatForMapFieldTest, MapByteSizeDynamicMessage) {
// Protobuf used to have a bug for serialize when map it marked CLEAN. It used
// repeated field to calculate ByteSizeLong but use map to serialize the real
// data, thus the ByteSizeLong may bigger than real serialized size. A crash
// might be happen at SerializeToString(). Or an "unexpect end group" warning
// might be happen at SerializeToString(). Or an "unexpected end group" warning
// was raised at parse back if user use SerializeWithCachedSizes() which
// avoids size check at serialize.
std::string serialized_data;

View File

@ -752,7 +752,7 @@ class PROTOBUF_EXPORT Reflection final {
Message* message, const FieldDescriptor* field) const;
// DEPRECATED. Please use Get(Mutable)RepeatedFieldRef() for repeated field
// access. The following repeated field accesors will be removed in the
// access. The following repeated field accessors will be removed in the
// future.
//
// Repeated field accessors -------------------------------------------------

View File

@ -180,7 +180,7 @@ std::pair<const char*, bool> EpsCopyInputStream::DoneFallback(const char* ptr,
if (PROTOBUF_PREDICT_FALSE(overrun != 0)) return {nullptr, true};
GOOGLE_DCHECK(limit_ > 0);
limit_end_ = buffer_end_;
// Distinquish ending on a pushed limit or ending on end-of-stream.
// Distinguish ending on a pushed limit or ending on end-of-stream.
SetEndOfStream();
return {ptr, true};
}

View File

@ -47,7 +47,7 @@ namespace internal {
// When you use implicit_cast, the compiler checks that the cast is safe.
// Such explicit implicit_casts are necessary in surprisingly many
// situations where C++ demands an exact type match instead of an
// argument type convertable to a target type.
// argument type convertible to a target type.
//
// The From type can be inferred, so the preferred syntax for using
// implicit_cast is the same as for static_cast etc.:

View File

@ -304,7 +304,7 @@ void DoNothing() {}
//
// TODO(xiaofeng): PROTOBUF_LITTLE_ENDIAN is unfortunately defined in
// google/protobuf/io/coded_stream.h and therefore can not be used here.
// Maybe move that macro definition here in the furture.
// Maybe move that macro definition here in the future.
uint32 ghtonl(uint32 x) {
union {
uint32 result;

View File

@ -38,7 +38,7 @@ namespace internal {
namespace {
static const int64 kSecondsPerDay = 3600 * 24;
// For DateTime, tests will mostly focuse on the date part because that's
// For DateTime, tests will mostly focus on the date part because that's
// the tricky one.
int64 CreateTimestamp(int year, int month, int day) {
DateTime time;

View File

@ -718,7 +718,7 @@ TEST_F(TextFormatTest, CompactRepeatedFieldPrinter) {
text);
}
// Print strings into multiple line, with indention. Use this to test
// Print strings into multiple line, with indentation. Use this to test
// BaseTextGenerator::Indent and BaseTextGenerator::Outdent.
class MultilineStringPrinter : public TextFormat::FastFieldValuePrinter {
public:
@ -2031,7 +2031,7 @@ TEST(TextFormatUnknownFieldTest, TestUnknownField) {
" }\n"
">",
&proto));
// Unmatched delimeters for message body
// Unmatched delimiters for message body
EXPECT_FALSE(parser.ParseFromString("unknown_message: {>", &proto));
// Unknown extension
EXPECT_TRUE(

View File

@ -199,7 +199,7 @@ class FieldMaskTree {
// Remove a path from the tree.
// If the path is a sub-path of an existing field path in the tree, it means
// we need remove the existing fied path and add all sub-paths except
// we need remove the existing field path and add all sub-paths except
// specified path. If the path matches an existing node in the tree, this node
// will be moved.
void RemovePath(const std::string& path, const Descriptor* descriptor);
@ -332,7 +332,7 @@ void FieldMaskTree::AddPath(const std::string& path) {
for (int i = 0; i < parts.size(); ++i) {
if (!new_branch && node != &root_ && node->children.empty()) {
// Path matches an existing leaf node. This means the path is already
// coverred by this tree (for example, adding "foo.bar.baz" to a tree
// covered by this tree (for example, adding "foo.bar.baz" to a tree
// which already contains "foo.bar").
return;
}
@ -707,7 +707,7 @@ bool FieldMaskUtil::TrimMessage(const FieldMask& mask, Message* message,
// fields.
FieldMaskTree tree;
tree.MergeFromFieldMask(mask);
// If keep_required_fields is true, implicitely add required fields of
// If keep_required_fields is true, implicitly add required fields of
// a message present in the tree to prevent from trimming.
if (options.keep_required_fields()) {
tree.AddRequiredFieldPath(GOOGLE_CHECK_NOTNULL(message->GetDescriptor()));

View File

@ -49,7 +49,7 @@ const char kRfc3339TimeFormat[] = "%E4Y-%m-%dT%H:%M:%S";
// timestamps like "1-01-0001T23:59:59Z" instead of "0001-01-0001T23:59:59Z".
const char kRfc3339TimeFormatNoPadding[] = "%Y-%m-%dT%H:%M:%S";
// Minimun seconds allowed in a google.protobuf.Timestamp value.
// Minimum seconds allowed in a google.protobuf.Timestamp value.
const int64 kTimestampMinSeconds = -62135596800LL;
// Maximum seconds allowed in a google.protobuf.Timestamp value.

View File

@ -152,7 +152,7 @@ class PROTOBUF_EXPORT JsonObjectWriter : public StructuredObjectWriter {
return false;
}
// Whether we are currently renderring inside a JSON object (i.e., between
// Whether we are currently rendering inside a JSON object (i.e., between
// StartObject() and EndObject()).
bool is_json_object() const { return is_json_object_; }

View File

@ -146,7 +146,7 @@ class JsonStreamParserTest : public ::testing::Test {
#ifndef _MSC_VER
// TODO(xiaofeng): We have to disable InSequence check for MSVC because it
// causes stack overflow due to its use of a linked list that is desctructed
// causes stack overflow due to its use of a linked list that is destructed
// recursively.
::testing::InSequence in_sequence_;
#endif // !_MSC_VER

View File

@ -63,7 +63,7 @@ class TypeInfoTestHelper {
// Creates a TypeInfo object for the given set of descriptors.
void ResetTypeInfo(const std::vector<const Descriptor*>& descriptors);
// Convinent overloads.
// Convenient overloads.
void ResetTypeInfo(const Descriptor* descriptor);
void ResetTypeInfo(const Descriptor* descriptor1,
const Descriptor* descriptor2);

View File

@ -82,7 +82,7 @@ PROTOBUF_EXPORT std::string GetStringOptionOrDefault(
// Returns a boolean value contained in Any type.
// TODO(skarvaje): Make these utilities dealing with Any types more generic,
// add more error checking and move to a more public/sharable location so others
// add more error checking and move to a more public/shareable location so others
// can use.
PROTOBUF_EXPORT bool GetBoolFromAny(const google::protobuf::Any& any);

View File

@ -1526,7 +1526,7 @@ int MaximumMatcher::FindMaximumMatch(bool early_return) {
}
}
// Backfill match_list1_ as we only filled match_list2_ when finding
// argumenting pathes.
// argumenting paths.
for (int i = 0; i < count2_; ++i) {
if ((*match_list2_)[i] != -1) {
(*match_list1_)[(*match_list2_)[i]] = i;

View File

@ -328,7 +328,7 @@ class PROTOBUF_EXPORT MessageDifferencer {
// Abstract base class from which all IgnoreCriteria derive.
// By adding IgnoreCriteria more complex ignore logic can be implemented.
// IgnoreCriteria are registed with AddIgnoreCriteria. For each compared
// IgnoreCriteria are registered with AddIgnoreCriteria. For each compared
// field IsIgnored is called on each added IgnoreCriteria until one returns
// true or all return false.
// IsIgnored is called for fields where at least one side has a value.