aboutsummaryrefslogtreecommitdiffhomepage
path: root/python/google/protobuf/pyext
diff options
context:
space:
mode:
authorGravatar xiaofeng@google.com <xiaofeng@google.com@630680e5-0e50-0410-840e-4b1c322b438d>2012-12-04 00:59:40 +0000
committerGravatar xiaofeng@google.com <xiaofeng@google.com@630680e5-0e50-0410-840e-4b1c322b438d>2012-12-04 00:59:40 +0000
commiteaaef0b39b6710574db25a264cc4980e40f678ea (patch)
tree772fcdbbe6c323dcb6c424bd5274783182fb6181 /python/google/protobuf/pyext
parentef9acc464db9c897e617e3d7b35f99bcb321b21a (diff)
Fix issues: 342, 424, 428, 430, 436
Diffstat (limited to 'python/google/protobuf/pyext')
-rw-r--r--python/google/protobuf/pyext/python-proto2.cc6
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 {