diff options
author | xiaofeng@google.com <xiaofeng@google.com@630680e5-0e50-0410-840e-4b1c322b438d> | 2012-12-04 00:59:40 +0000 |
---|---|---|
committer | xiaofeng@google.com <xiaofeng@google.com@630680e5-0e50-0410-840e-4b1c322b438d> | 2012-12-04 00:59:40 +0000 |
commit | eaaef0b39b6710574db25a264cc4980e40f678ea (patch) | |
tree | 772fcdbbe6c323dcb6c424bd5274783182fb6181 /python | |
parent | ef9acc464db9c897e617e3d7b35f99bcb321b21a (diff) | |
download | protobuf-eaaef0b39b6710574db25a264cc4980e40f678ea.tar.gz protobuf-eaaef0b39b6710574db25a264cc4980e40f678ea.tar.bz2 protobuf-eaaef0b39b6710574db25a264cc4980e40f678ea.zip |
Fix issues: 342, 424, 428, 430, 436
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 { |