From adf9d22de4d5c422dcaeca022ea53880f7264be6 Mon Sep 17 00:00:00 2001 From: Alexis Hildebrandt Date: Mon, 4 Jul 2022 22:30:31 +0200 Subject: Remove support for Python 2.x --- src/pyutils.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/pyutils.h') 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 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(); } -- cgit v1.2.3