Update the comment for ctype to note that it's deprecated.

New code should prefer `features.(pb.cpp).string_type`. We can't use the `deprecated=true` option for now due to failing tests.

PiperOrigin-RevId: 643036543
pull/17125/head
Protobuf Team Bot 6 months ago committed by Copybara-Service
parent d471c874e3
commit bf306b3bea
  1. 7
      src/google/protobuf/descriptor.proto

@ -635,13 +635,14 @@ message MessageOptions {
}
message FieldOptions {
// NOTE: ctype is deprecated. Use `features.(pb.cpp).string_type` instead.
// The ctype option instructs the C++ code generator to use a different
// representation of the field than it normally would. See the specific
// options below. This option is only implemented to support use of
// [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of
// type "bytes" in the open source release -- sorry, we'll try to include
// other types in a future version!
optional CType ctype = 1 [default = STRING];
// type "bytes" in the open source release.
// TODO: make ctype actually deprecated.
optional CType ctype = 1 [/*deprecated = true,*/ default = STRING];
enum CType {
// Default mode.
STRING = 0;

Loading…
Cancel
Save