Commit 812ecf93 authored by Andrey Myznikov's avatar Andrey Myznikov Committed by Robert Edmonds

Fix incorrect 'Short version of service name' generation for ProtobufCServiceDescriptor

parent cbe7b84a
......@@ -197,7 +197,7 @@ void ServiceGenerator::GenerateServiceDescriptor(io::Printer* printer)
{
int n_methods = descriptor_->method_count();
MethodIndexAndName *mi_array = new MethodIndexAndName[n_methods];
vars_["n_methods"] = SimpleItoa(n_methods);
printer->Print(vars_, "static const ProtobufCMethodDescriptor $lcfullname$__method_descriptors[$n_methods$] =\n"
"{\n");
......@@ -224,6 +224,8 @@ void ServiceGenerator::GenerateServiceDescriptor(io::Printer* printer)
}
printer->Print(vars_, "};\n");
vars_["name"] = descriptor_->name();
printer->Print(vars_, "const ProtobufCServiceDescriptor $lcfullname$__descriptor =\n"
"{\n"
" PROTOBUF_C__SERVICE_DESCRIPTOR_MAGIC,\n"
......@@ -251,7 +253,7 @@ void ServiceGenerator::GenerateCallersImplementations(io::Printer* printer)
vars_["output_typename"] = FullNameToC(method->output_type()->full_name());
vars_["padddddddddddddddddd"] = ConvertToSpaces(lcfullname + "__" + lcname);
vars_["index"] = SimpleItoa(i);
printer->Print(vars_,
"void $lcfullname$__$method$(ProtobufCService *service,\n"
" $padddddddddddddddddd$ const $input_typename$ *input,\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