diff options
author | Alexis Hildebrandt <afh@surryhill.net> | 2022-07-04 22:30:31 +0200 |
---|---|---|
committer | Martin Michlmayr <tbm@cyrius.com> | 2023-02-01 09:31:05 +0800 |
commit | adf9d22de4d5c422dcaeca022ea53880f7264be6 (patch) | |
tree | 48c99bde533a0118e8452bdc804dc8465469d398 /src/pyutils.h | |
parent | ba33c732de8e272576066d7a22de5ebc01a355c9 (diff) | |
download | fork-ledger-adf9d22de4d5c422dcaeca022ea53880f7264be6.tar.gz fork-ledger-adf9d22de4d5c422dcaeca022ea53880f7264be6.tar.bz2 fork-ledger-adf9d22de4d5c422dcaeca022ea53880f7264be6.zip |
Remove support for Python 2.x
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(); } |