|
@@ -779,7 +779,7 @@ PyObject* CheckString(PyObject* arg, const FieldDescriptor* descriptor) {
|
|
encoded_string = arg; // Already encoded.
|
|
encoded_string = arg; // Already encoded.
|
|
Py_INCREF(encoded_string);
|
|
Py_INCREF(encoded_string);
|
|
} else {
|
|
} else {
|
|
- encoded_string = PyUnicode_AsEncodedObject(arg, "utf-8", NULL);
|
|
|
|
|
|
+ encoded_string = PyUnicode_AsEncodedString(arg, "utf-8", NULL);
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
// In this case field type is "bytes".
|
|
// In this case field type is "bytes".
|