File tree Expand file tree Collapse file tree 1 file changed +0
-9
lines changed Expand file tree Collapse file tree 1 file changed +0
-9
lines changed Original file line number Diff line number Diff line change @@ -928,21 +928,12 @@ class str : public object {
928
928
private:
929
929
// / Return string representation -- always returns a new reference, even if already a str
930
930
static PyObject *raw_str (PyObject *op) {
931
- #ifdef PYBIND11_STR_RAW_STR_PY2_EMULATE_UNICODE_CONSTRUCTOR_NOT_IMPLICIT_ENCODE
932
931
#if PY_MAJOR_VERSION < 3
933
932
PyObject *str_value = PyObject_Unicode (op);
934
933
#else
935
934
PyObject *str_value = PyObject_Str (op);
936
935
#endif
937
936
if (!str_value) throw error_already_set ();
938
- #else
939
- PyObject *str_value = PyObject_Str (op);
940
- if (!str_value) throw error_already_set ();
941
- #if PY_MAJOR_VERSION < 3
942
- PyObject *unicode = PyUnicode_FromEncodedObject (str_value, " utf-8" , nullptr );
943
- Py_XDECREF (str_value); str_value = unicode;
944
- #endif
945
- #endif
946
937
return str_value;
947
938
}
948
939
};
You can’t perform that action at this time.
0 commit comments