diff options
author | Jie Luo <anandolee@gmail.com> | 2017-04-10 16:37:57 -0700 |
---|---|---|
committer | Feng Xiao <xfxyjwf@gmail.com> | 2017-04-10 16:37:57 -0700 |
commit | 899460c9cb328e51b5da0ffe5d73e03c8f00dd15 (patch) | |
tree | 882fc6e219956b77f3f30c8560b10c017fa7f61f /python/google/protobuf/pyext | |
parent | e91caa1f197ec1bd48a713c435c47e6f3948a1fb (diff) |
cherrypick descriptor_pool.FindFileContainingSymbol by extensions (#2962)
* Use PyUnicode_AsEncodedString() instead of PyUnicode_AsEncodedObject()
* Cherrypick the fix descriptor_pool.FindFileContainingSymbol by extensions.
Diffstat (limited to 'python/google/protobuf/pyext')
-rw-r--r-- | python/google/protobuf/pyext/message.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/python/google/protobuf/pyext/message.cc b/python/google/protobuf/pyext/message.cc index c810b788..85aaa46f 100644 --- a/python/google/protobuf/pyext/message.cc +++ b/python/google/protobuf/pyext/message.cc @@ -779,7 +779,7 @@ PyObject* CheckString(PyObject* arg, const FieldDescriptor* descriptor) { encoded_string = arg; // Already encoded. Py_INCREF(encoded_string); } else { - encoded_string = PyUnicode_AsEncodedObject(arg, "utf-8", NULL); + encoded_string = PyUnicode_AsEncodedString(arg, "utf-8", NULL); } } else { // In this case field type is "bytes". |