diff options
author | John Wiegley <johnw@newartisans.com> | 2009-11-21 15:19:42 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-11-21 15:19:42 -0500 |
commit | f01fa1a5131c287a4efe2708ffe3c9bc57b79468 (patch) | |
tree | 2a2f732edd59c4f42c1eb3e9a9e95ff135091bab /src/py_utils.cc | |
parent | 117dddabd4f883de4f464821f9567d889a6fa449 (diff) | |
parent | acb24d6d22e19d4f6b3883c029dd9fef5c1c9529 (diff) | |
download | fork-ledger-f01fa1a5131c287a4efe2708ffe3c9bc57b79468.tar.gz fork-ledger-f01fa1a5131c287a4efe2708ffe3c9bc57b79468.tar.bz2 fork-ledger-f01fa1a5131c287a4efe2708ffe3c9bc57b79468.zip |
Merge branch 'next'
Diffstat (limited to 'src/py_utils.cc')
-rw-r--r-- | src/py_utils.cc | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/py_utils.cc b/src/py_utils.cc index 2736ed3e..5203599f 100644 --- a/src/py_utils.cc +++ b/src/py_utils.cc @@ -79,15 +79,8 @@ struct string_to_python { static PyObject* convert(const string& str) { -#if 1 - // Return a Unicode object - PyObject * pstr = PyString_FromString(str.c_str()); - PyObject * uni = PyUnicode_FromEncodedObject(pstr, "UTF-8", NULL); - return object(handle<>(borrowed(uni))).ptr(); -#else - // Return a 7-bit ASCII string + // Return bytes, not characters; see __unicode__ methods for that return incref(object(static_cast<const std::string&>(str)).ptr()); -#endif } }; |