Commit 9dcb1c3b by Wenzel Jakob

Merge pull request #71 from ax3l/fix-strBuild2

Fix Compile Error: str Naming
parents 61587164 7cd569c7
...@@ -261,12 +261,12 @@ public: ...@@ -261,12 +261,12 @@ public:
}; };
inline pybind11::str handle::str() const { inline pybind11::str handle::str() const {
PyObject *str = PyObject_Str(m_ptr); PyObject *strValue = PyObject_Str(m_ptr);
#if PY_MAJOR_VERSION < 3 #if PY_MAJOR_VERSION < 3
PyObject *unicode = PyUnicode_FromEncodedObject(str, "utf-8", nullptr); PyObject *unicode = PyUnicode_FromEncodedObject(strValue, "utf-8", nullptr);
Py_XDECREF(str); str = unicode; Py_XDECREF(strValue); strValue = unicode;
#endif #endif
return pybind11::str(str, false); return pybind11::str(strValue, false);
} }
class bytes : public object { class bytes : public object {
......
Markdown is supported
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