Update protoc-gen-upbdefs.cc

pull/13171/head
Samuel Benzaquen 3 years ago committed by GitHub
parent aa779cd779
commit 8d755661aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      upbc/protoc-gen-upbdefs.cc

@ -170,10 +170,14 @@ bool Generator::Generate(const protobuf::FileDescriptor* file,
return false;
}
Output h_def_output(context->Open(DefHeaderFilename(file->name())));
std::unique_ptr<protobuf::io::ZeroCopyOutputStream> h_output_stream(
context->Open(DefHeaderFilename(file->name())));
Output h_def_output(h_output_stream.get());
WriteDefHeader(file, h_def_output);
Output c_def_output(context->Open(DefSourceFilename(file->name())));
std::unique_ptr<protobuf::io::ZeroCopyOutputStream> c_output_stream(
context->Open(DefSourceFilename(file->name())));
Output c_def_output(c_output_stream.get());
WriteDefSource(file, c_def_output);
return true;

Loading…
Cancel
Save