based on https://github.com/CloudI/CloudI/commit/a7d593e3aa84b157e9c6c2d49fa072c8756d884a diff --git a/src/api/python/cloudi_py.cpp b/src/api/python/cloudi_py.cpp index ad3124f7..0e38c880 100644 --- a/src/api/python/cloudi_py.cpp +++ b/src/api/python/cloudi_py.cpp @@ -752,8 +752,9 @@ class callback : public CloudI::API::function_object_c { Py_ssize_t response_size_tmp = 0; #ifdef PYTHON_VERSION_3_3_COMPATIBLE - response = PyUnicode_AsUTF8AndSize(result, - &response_size_tmp); + response = + const_cast(PyUnicode_AsUTF8AndSize( + result, &response_size_tmp)); if (response == NULL) { PyErr_Print();