diff options
Diffstat (limited to 'src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc')
-rw-r--r-- | src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc b/src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc index d6609692..30a13ddb 100644 --- a/src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc +++ b/src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc @@ -55,8 +55,6 @@ void SetEnumVariables(const FieldDescriptor* descriptor, (descriptor->file() != descriptor->enum_type()->file())) { (*variables)["property_type"] = "enum " + type; } - // TODO(thomasvl): Make inclusion of descriptor compile time and output - // both of these. Note: Extensions currently have to have the EnumDescription. (*variables)["enum_verifier"] = type + "_IsValidValue"; (*variables)["enum_desc_func"] = type + "_EnumDescriptor"; @@ -74,11 +72,9 @@ EnumFieldGenerator::~EnumFieldGenerator() {} void EnumFieldGenerator::GenerateFieldDescriptionTypeSpecific( io::Printer* printer) const { - // TODO(thomasvl): Output the CPP check to use descFunc or validator based - // on final compile. printer->Print( variables_, - " .typeSpecific.enumDescFunc = $enum_desc_func$,\n"); + " .dataTypeSpecific.enumDescFunc = $enum_desc_func$,\n"); } void EnumFieldGenerator::GenerateCFunctionDeclarations( @@ -103,7 +99,7 @@ void EnumFieldGenerator::GenerateCFunctionImplementations( "int32_t $owning_message_class$_$capitalized_name$_RawValue($owning_message_class$ *message) {\n" " GPBDescriptor *descriptor = [$owning_message_class$ descriptor];\n" " GPBFieldDescriptor *field = [descriptor fieldWithNumber:$field_number_name$];\n" - " return GPBGetInt32IvarWithField(message, field);\n" + " return GPBGetMessageInt32Field(message, field);\n" "}\n" "\n" "void Set$owning_message_class$_$capitalized_name$_RawValue($owning_message_class$ *message, int32_t value) {\n" @@ -137,11 +133,9 @@ RepeatedEnumFieldGenerator::~RepeatedEnumFieldGenerator() {} void RepeatedEnumFieldGenerator::GenerateFieldDescriptionTypeSpecific( io::Printer* printer) const { - // TODO(thomasvl): Output the CPP check to use descFunc or validator based - // on final compile. printer->Print( variables_, - " .typeSpecific.enumDescFunc = $enum_desc_func$,\n"); + " .dataTypeSpecific.enumDescFunc = $enum_desc_func$,\n"); } } // namespace objectivec |