lower-case field names in default value.

git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@94 00440858-1255-0410-a3e6-75ea37f81c3a
This commit is contained in:
lahiker42 2008-12-17 16:46:13 +00:00
parent c9dfadfb89
commit 11f4329254

View File

@ -291,6 +291,7 @@ GenerateMessageDescriptor(io::Printer* printer) {
bool already_defined = false;
vars["name"] = fd->name();
vars["lcname"] = CamelToLower(fd->name());
vars["maybe_static"] = "static ";
vars["field_dv_ctype_suffix"] = "";
vars["default_value"] = field_generators_.get(fd).GetDefaultValue();
@ -347,7 +348,7 @@ GenerateMessageDescriptor(io::Printer* printer) {
break;
}
if (!already_defined)
printer->Print(vars, "$maybe_static$const $field_dv_ctype$ $lcclassname$__$name$__default_value$field_dv_ctype_suffix$ = $default_value$;\n");
printer->Print(vars, "$maybe_static$const $field_dv_ctype$ $lcclassname$__$lcname$__default_value$field_dv_ctype_suffix$ = $default_value$;\n");
}
}