Commit 11f43292 authored by lahiker42's avatar lahiker42

lower-case field names in default value.


git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@94 00440858-1255-0410-a3e6-75ea37f81c3a
parent c9dfadfb
......@@ -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");
}
}
......
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