Skip to content

Commit

Permalink
Avoid marking generated C++ messages as final for now (#5928)
Browse files Browse the repository at this point in the history
We need to mark messages as final soon, but before we do that we need to
provide a temporary opt-out mechanism to accommodate existing code that
inherits from generated messages. For 3.7.1 let's stop marking messages
final but in 3.8 we can reintroduce "final" with an opt-out option.
  • Loading branch information
acozzette authored and TeBoring committed Mar 25, 2019
1 parent 059851f commit b3c132f
Show file tree
Hide file tree
Showing 13 changed files with 58 additions and 58 deletions.
2 changes: 1 addition & 1 deletion src/google/protobuf/any.pb.h

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

6 changes: 3 additions & 3 deletions src/google/protobuf/api.pb.h

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

2 changes: 1 addition & 1 deletion src/google/protobuf/compiler/cpp/cpp_message.cc
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ bool HasPrivateHasMethod(const FieldDescriptor* field) {

bool ShouldMarkClassAsFinal(const Descriptor* descriptor,
const Options& options) {
return true;
return false;
}

bool ShouldMarkClearAsFinal(const Descriptor* descriptor,
Expand Down
8 changes: 4 additions & 4 deletions src/google/protobuf/compiler/plugin.pb.h

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

54 changes: 27 additions & 27 deletions src/google/protobuf/descriptor.pb.h

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

2 changes: 1 addition & 1 deletion src/google/protobuf/duration.pb.h

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

2 changes: 1 addition & 1 deletion src/google/protobuf/empty.pb.h

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

2 changes: 1 addition & 1 deletion src/google/protobuf/field_mask.pb.h

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

2 changes: 1 addition & 1 deletion src/google/protobuf/source_context.pb.h

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

6 changes: 3 additions & 3 deletions src/google/protobuf/struct.pb.h

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

2 changes: 1 addition & 1 deletion src/google/protobuf/timestamp.pb.h

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

Loading

0 comments on commit b3c132f

Please sign in to comment.