From 16570e00794f4e6e512aa97a60f029cc70ff8cb0 Mon Sep 17 00:00:00 2001 From: Tom Henderson Date: Fri, 24 Aug 2018 18:06:28 -0700 Subject: [PATCH] build: Fix type mismatch due to Python 3.7 API change --- src/core/bindings/modulegen_customizations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/bindings/modulegen_customizations.py b/src/core/bindings/modulegen_customizations.py index 2835090b5..bc682710f 100644 --- a/src/core/bindings/modulegen_customizations.py +++ b/src/core/bindings/modulegen_customizations.py @@ -62,7 +62,7 @@ PyObject *item = PyList_GET_ITEM(%(py_name)s, %(idx)s); '"argument %s must be a list of strings");') % self.name) wrapper.before_call.write_code( '#if PY_VERSION_HEX >= 0x03000000\n' - '{var}[{idx}] = PyUnicode_AsUTF8(item);\n' + '{var}[{idx}] = const_cast (PyUnicode_AsUTF8(item));\n' '#else\n' '{var}[{idx}] = PyString_AsString(item);\n' '#endif\n'