Merge pull request #71 from ax3l/fix-strBuild2

Fix Compile Error: str Naming
This commit is contained in:
Wenzel Jakob 2016-01-19 09:50:49 +01:00
commit 9dcb1c3b3a

View File

@ -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 {