mirror of
https://github.com/protobuf-c/protobuf-c.git
synced 2024-12-27 22:01:02 +08:00
Use reserved word in string within descriptor (from Andrei Nigmatulin).
git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@193 00440858-1255-0410-a3e6-75ea37f81c3a
This commit is contained in:
parent
eeed9c2b7a
commit
aab90f4a32
@ -1,3 +1,8 @@
|
||||
0.12 [NOT YET RELEASED]
|
||||
- for field names which are reserved words, use the real name
|
||||
given in the protobuf-c file, not the mangled name which
|
||||
is the name of the member in the C structure. (Andrei Nigmatulin)
|
||||
|
||||
0.11:
|
||||
- allow CFLAGS=-DPRINT_UNPACK_ERRORS=0 to suppress
|
||||
unpack warnings from being printed at compile time (Andrei Nigmatulin)
|
||||
|
@ -50,6 +50,7 @@ void FieldGenerator::GenerateDescriptorInitializerGeneric(io::Printer* printer,
|
||||
variables["TYPE"] = type_macro;
|
||||
variables["classname"] = FullNameToC(FieldScope(descriptor_)->full_name());
|
||||
variables["name"] = FieldName(descriptor_);
|
||||
variables["proto_name"] = descriptor_->name();
|
||||
variables["descriptor_addr"] = descriptor_addr;
|
||||
variables["value"] = SimpleItoa(descriptor_->number());
|
||||
|
||||
@ -63,7 +64,7 @@ void FieldGenerator::GenerateDescriptorInitializerGeneric(io::Printer* printer,
|
||||
|
||||
printer->Print(variables,
|
||||
"{\n"
|
||||
" \"$name$\",\n"
|
||||
" \"$proto_name$\",\n"
|
||||
" $value$,\n"
|
||||
" PROTOBUF_C_LABEL_$LABEL$,\n"
|
||||
" PROTOBUF_C_TYPE_$TYPE$,\n");
|
||||
|
Loading…
x
Reference in New Issue
Block a user