mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-26 15:12:01 +00:00
Merge pull request #71 from ax3l/fix-strBuild2
Fix Compile Error: str Naming
This commit is contained in:
commit
9dcb1c3b3a
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user