Commit db9060dc authored by Jan Tattermusch's avatar Jan Tattermusch

addressed TODO for lite runtime

parent d92de174
...@@ -122,13 +122,17 @@ void ExtensionGenerator::GenerateStaticVariableInitializers(Writer* writer) { ...@@ -122,13 +122,17 @@ void ExtensionGenerator::GenerateStaticVariableInitializers(Writer* writer) {
} }
writer->WriteLine("$0$,", default_val); writer->WriteLine("$0$,", default_val);
} }
// TODO(jtattermusch): include following snippet writer->WriteLine(
//writer.WriteLine("{0},", "$0$,",
// (Descriptor.MappedType == MappedType.Message) ? type + ".DefaultInstance" : "null"); (GetCSharpType(descriptor_->type()) == CSHARPTYPE_MESSAGE) ?
//writer.WriteLine("{0},", type_name() + ".DefaultInstance" : "null");
// (Descriptor.MappedType == MappedType.Enum) ? "new EnumLiteMap<" + type + ">()" : "null"); writer->WriteLine(
//writer.WriteLine("{0}.{1}FieldNumber,", scope, name); "$0$,",
//writer.Write("pbd::FieldType.{0}", Descriptor.FieldType); (GetCSharpType(descriptor_->type()) == CSHARPTYPE_ENUM) ?
"new EnumLiteMap<" + type_name() + ">()" : "null");
writer->WriteLine("$0$.$1$FieldNumber,", scope_,
GetPropertyName(descriptor_));
writer->Write("pbd::FieldType.$0$", capitalized_type_name());
if (descriptor_->is_repeated()) { if (descriptor_->is_repeated()) {
writer->WriteLine(","); writer->WriteLine(",");
writer->Write(descriptor_->is_packed() ? "true" : "false"); writer->Write(descriptor_->is_packed() ? "true" : "false");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment