From eaaef0b39b6710574db25a264cc4980e40f678ea Mon Sep 17 00:00:00 2001 From: "xiaofeng@google.com" Date: Tue, 4 Dec 2012 00:59:40 +0000 Subject: Fix issues: 342, 424, 428, 430, 436 --- python/google/protobuf/pyext/python-proto2.cc | 6 ------ 1 file changed, 6 deletions(-) (limited to 'python/google') 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 { -- cgit v1.2.3