[ObjC] Typos and comment improvements.

pull/7351/head^2
Thomas Van Lenten 5 years ago
parent 7b6016e343
commit dddeed298b
  1. 5
      objectivec/GPBDescriptor.m
  2. 4
      objectivec/GPBDescriptor_PackagePrivate.h
  3. 2
      objectivec/GPBUtilities.h

@ -508,7 +508,8 @@ uint32_t GPBFieldAlternateTag(GPBFieldDescriptor *self) {
BOOL isMessage = GPBDataTypeIsMessage(dataType);
BOOL isMapOrArray = GPBFieldIsMapOrArray(self);
// If proto3 optionals weren't know, compute the flag for the rest of the runtime.
// If proto3 optionals weren't known (i.e. generated code from an
// older version), compute the flag for the rest of the runtime.
if (!proto3OptionalKnown) {
// If it was...
// - proto3 syntax
@ -530,7 +531,7 @@ uint32_t GPBFieldAlternateTag(GPBFieldDescriptor *self) {
// autocreation.
hasOrCountSel_ = SelFromStrings(NULL, coreDesc->name, "_Count", NO);
} else {
// Know it is a single field; it gets has/setHas selectors if...
// It is a single field; it gets has/setHas selectors if...
// - not in a oneof (negative has index)
// - not clearing on zero
if ((coreDesc->hasIndex >= 0) &&

@ -155,9 +155,9 @@ typedef NS_OPTIONS(uint32_t, GPBDescriptorInitializationFlags) {
// breaking change in the runtime.
GPBDescriptorInitializationFlag_UsesClassRefs = 1 << 2,
// This flag is used to indicate that the generated sources already containg
// This flag is used to indicate that the generated sources already contain
// the `GPBFieldClearHasIvarOnZero` flag and it doesn't have to be computed
// at startup, this allows older generated code to still work with the
// at startup. This allows older generated code to still work with the
// current runtime library.
GPBDescriptorInitializationFlag_Proto3OptionalKnown = 1 << 3,
};

@ -95,7 +95,7 @@ BOOL GPBMessageHasFieldSet(GPBMessage *self, GPBFieldDescriptor *field);
void GPBClearMessageField(GPBMessage *self, GPBFieldDescriptor *field);
/**
* Clears the given onoof field for the given message.
* Clears the given oneof field for the given message.
*
* @param self The message for which to clear the field.
* @param oneof The oneof to clear.

Loading…
Cancel
Save