diff options
Diffstat (limited to 'python')
-rw-r--r-- | python/google/protobuf/pyext/python-proto2.cc | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/python/google/protobuf/pyext/python-proto2.cc b/python/google/protobuf/pyext/python-proto2.cc index 62753413..eebb752b 100644 --- a/python/google/protobuf/pyext/python-proto2.cc +++ b/python/google/protobuf/pyext/python-proto2.cc @@ -427,9 +427,6 @@ static bool CheckAndSetString( GOOGLE_DCHECK(descriptor->type() == google::protobuf::FieldDescriptor::TYPE_STRING || descriptor->type() == google::protobuf::FieldDescriptor::TYPE_BYTES); if (descriptor->type() == google::protobuf::FieldDescriptor::TYPE_STRING) { -#else - if (descriptor->file()->options().cc_api_version() == 2 && - descriptor->type() == google::protobuf::FieldDescriptor::TYPE_STRING) { if (!PyString_Check(arg) && !PyUnicode_Check(arg)) { FormatTypeError(arg, "str, unicode"); return false; @@ -457,9 +454,6 @@ static bool CheckAndSetString( PyObject* encoded_string = NULL; if (descriptor->type() == google::protobuf::FieldDescriptor::TYPE_STRING) { -#else - if (descriptor->file()->options().cc_api_version() == 2 && - descriptor->type() == google::protobuf::FieldDescriptor::TYPE_STRING) { if (PyString_Check(arg)) { encoded_string = PyString_AsEncodedObject(arg, "utf-8", NULL); } else { |