aboutsummaryrefslogtreecommitdiffstats
path: root/community/cloudi/python-3.7.patch
blob: 189a8351312dd8277dcb41694cacf2845822a139 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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<char *>(PyUnicode_AsUTF8AndSize(
+                            result, &response_size_tmp));
                     if (response == NULL)
                     {
                         PyErr_Print();