Commit 9dcb1c3b authored by Wenzel Jakob's avatar Wenzel Jakob
Browse files

Merge pull request #71 from ax3l/fix-strBuild2

Fix Compile Error: str Naming
parents 61587164 7cd569c7
......@@ -261,12 +261,12 @@ public:
};
inline pybind11::str handle::str() const {
PyObject *str = PyObject_Str(m_ptr);
PyObject *strValue = PyObject_Str(m_ptr);
#if PY_MAJOR_VERSION < 3
PyObject *unicode = PyUnicode_FromEncodedObject(str, "utf-8", nullptr);
Py_XDECREF(str); str = unicode;
PyObject *unicode = PyUnicode_FromEncodedObject(strValue, "utf-8", nullptr);
Py_XDECREF(strValue); strValue = unicode;
#endif
return pybind11::str(str, false);
return pybind11::str(strValue, false);
}
class bytes : public object {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment