diff options
Diffstat (limited to 'src/pyutils.h')
-rw-r--r-- | src/pyutils.h | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/src/pyutils.h b/src/pyutils.h index 7bc0d0af..41a91c64 100644 --- a/src/pyutils.h +++ b/src/pyutils.h @@ -131,12 +131,7 @@ template <typename T> PyObject * str_to_py_unicode(const T& str) { using namespace boost::python; -#if PY_MAJOR_VERSION >= 3 PyObject * uni = PyUnicode_FromString(str.c_str()); -#else - PyObject * pstr = PyString_FromString(str.c_str()); - PyObject * uni = PyUnicode_FromEncodedObject(pstr, "UTF-8", NULL); -#endif return object(handle<>(borrowed(uni))).ptr(); } |