Skip to content

Commit

Permalink
Add java options to plugin proto and rollback the r450
Browse files Browse the repository at this point in the history
  • Loading branch information
liujisi@google.com committed Dec 5, 2012
1 parent 0c995c9 commit 2273ee4
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 53 deletions.
6 changes: 2 additions & 4 deletions src/google/protobuf/compiler/cpp/cpp_message.cc
Expand Up @@ -857,14 +857,12 @@ GenerateDefaultInstanceInitializer(io::Printer* printer) {
void MessageGenerator::
GenerateShutdownCode(io::Printer* printer) {
printer->Print(
"delete $classname$::default_instance_;\n"
"$classname$::default_instance_ = NULL;\n",
"delete $classname$::default_instance_;\n",
"classname", classname_);

if (HasDescriptorMethods(descriptor_->file())) {
printer->Print(
"delete $classname$_reflection_;\n"
"$classname$_reflection_ = NULL;\n",
"delete $classname$_reflection_;\n",
"classname", classname_);
}

Expand Down
3 changes: 1 addition & 2 deletions src/google/protobuf/compiler/cpp/cpp_string_field.cc
Expand Up @@ -251,8 +251,7 @@ void StringFieldGenerator::
GenerateShutdownCode(io::Printer* printer) const {
if (!descriptor_->default_value_string().empty()) {
printer->Print(variables_,
"delete $classname$::$default_variable$;\n"
"$classname$::$default_variable$ = NULL;\n");
"delete $classname$::$default_variable$;\n");
}
}

Expand Down
10 changes: 3 additions & 7 deletions src/google/protobuf/compiler/plugin.pb.cc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/google/protobuf/compiler/plugin.proto
Expand Up @@ -45,6 +45,8 @@
// flag "--${NAME}_out" is passed to protoc.

package google.protobuf.compiler;
option java_package = "com.google.protobuf.compiler";
option java_outer_classname = "PluginProtos";

import "google/protobuf/descriptor.proto";

Expand Down
40 changes: 0 additions & 40 deletions src/google/protobuf/descriptor.pb.cc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2273ee4

Please sign in to comment.