mirror of
https://github.com/protobuf-c/protobuf-c.git
synced 2025-01-14 09:17:55 +08:00
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:
parent
c9dfadfb89
commit
11f4329254
@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user