Skip to content

Commit

Permalink
Merge pull request #49 from ptzz/master
Browse files Browse the repository at this point in the history
Fix compilation error
  • Loading branch information
nixprime committed Sep 8, 2018
2 parents beb919c + c881adf commit 3fd5fb9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/python_extension.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ typedef std::unique_ptr<PyObject, PyObjectDeleter> PyObjPtr;
inline bool PyVimString_AsStringAndSize(PyObject* obj, char** data,
Py_ssize_t* size) {
#if PY_MAJOR_VERSION >= 3
*data = PyUnicode_AsUTF8AndSize(obj, size);
*data = const_cast<char *>(PyUnicode_AsUTF8AndSize(obj, size));
return *data != nullptr;
#else
return PyString_AsStringAndSize(obj, data, size) >= 0;
Expand Down

0 comments on commit 3fd5fb9

Please sign in to comment.