File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
python/google/protobuf/pyext Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ PyObject* subscript(ExtensionDict* self, PyObject* key) {
118118 return nullptr ;
119119 }
120120
121- if (descriptor->label () != FieldDescriptor::LABEL_REPEATED &&
121+ if (! descriptor->is_repeated () &&
122122 descriptor->cpp_type () != FieldDescriptor::CPPTYPE_MESSAGE) {
123123 return cmessage::InternalGetScalar (self->parent ->message , descriptor);
124124 }
@@ -130,7 +130,7 @@ PyObject* subscript(ExtensionDict* self, PyObject* key) {
130130 return iterator->second ->AsPyObject ();
131131 }
132132
133- if (descriptor->label () != FieldDescriptor::LABEL_REPEATED &&
133+ if (! descriptor->is_repeated () &&
134134 descriptor->cpp_type () == FieldDescriptor::CPPTYPE_MESSAGE) {
135135 // TODO: consider building the class on the fly!
136136 ContainerBase* sub_message =
@@ -142,7 +142,7 @@ PyObject* subscript(ExtensionDict* self, PyObject* key) {
142142 return sub_message->AsPyObject ();
143143 }
144144
145- if (descriptor->label () == FieldDescriptor::LABEL_REPEATED ) {
145+ if (descriptor->is_repeated () ) {
146146 if (descriptor->cpp_type () == FieldDescriptor::CPPTYPE_MESSAGE) {
147147 // On the fly message class creation is needed to support the following
148148 // situation:
You can’t perform that action at this time.
0 commit comments