Skip to content

Commit dddeed2

Browse files
committedApr 24, 2020
[ObjC] Typos and comment improvements.
1 parent 7b6016e commit dddeed2

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed
 

‎objectivec/GPBDescriptor.m

+3-2
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,8 @@ - (instancetype)initWithFieldDescription:(void *)description
508508
BOOL isMessage = GPBDataTypeIsMessage(dataType);
509509
BOOL isMapOrArray = GPBFieldIsMapOrArray(self);
510510

511-
// If proto3 optionals weren't know, compute the flag for the rest of the runtime.
511+
// If proto3 optionals weren't known (i.e. generated code from an
512+
// older version), compute the flag for the rest of the runtime.
512513
if (!proto3OptionalKnown) {
513514
// If it was...
514515
// - proto3 syntax
@@ -530,7 +531,7 @@ - (instancetype)initWithFieldDescription:(void *)description
530531
// autocreation.
531532
hasOrCountSel_ = SelFromStrings(NULL, coreDesc->name, "_Count", NO);
532533
} else {
533-
// Know it is a single field; it gets has/setHas selectors if...
534+
// It is a single field; it gets has/setHas selectors if...
534535
// - not in a oneof (negative has index)
535536
// - not clearing on zero
536537
if ((coreDesc->hasIndex >= 0) &&

‎objectivec/GPBDescriptor_PackagePrivate.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,9 @@ typedef NS_OPTIONS(uint32_t, GPBDescriptorInitializationFlags) {
155155
// breaking change in the runtime.
156156
GPBDescriptorInitializationFlag_UsesClassRefs = 1 << 2,
157157

158-
// This flag is used to indicate that the generated sources already containg
158+
// This flag is used to indicate that the generated sources already contain
159159
// the `GPBFieldClearHasIvarOnZero` flag and it doesn't have to be computed
160-
// at startup, this allows older generated code to still work with the
160+
// at startup. This allows older generated code to still work with the
161161
// current runtime library.
162162
GPBDescriptorInitializationFlag_Proto3OptionalKnown = 1 << 3,
163163
};

‎objectivec/GPBUtilities.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ BOOL GPBMessageHasFieldSet(GPBMessage *self, GPBFieldDescriptor *field);
9595
void GPBClearMessageField(GPBMessage *self, GPBFieldDescriptor *field);
9696

9797
/**
98-
* Clears the given onoof field for the given message.
98+
* Clears the given oneof field for the given message.
9999
*
100100
* @param self The message for which to clear the field.
101101
* @param oneof The oneof to clear.

0 commit comments

Comments
 (0)
Please sign in to comment.