Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compilation error #49

Merged
merged 3 commits into from
Sep 8, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Change to const_cast
  • Loading branch information
maxnordlund committed Jul 3, 2018
commit c881adfcb254dd494d78f68681b12ef0eb558e10
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 = (char*)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