From 6685b690ac507cb26c82f4b55d3fdf6a4861a16e Mon Sep 17 00:00:00 2001 From: "Laszlo Boszormenyi (GCS)" Date: Tue, 23 Oct 2018 15:33:32 +0100 Subject: [PATCH] more_Python_3.7_compatibility Gbp-Pq: Name more_Python_3.7_compatibility.patch --- python/google/protobuf/pyext/extension_dict.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/google/protobuf/pyext/extension_dict.cc b/python/google/protobuf/pyext/extension_dict.cc index 018b5c2..174c547 100644 --- a/python/google/protobuf/pyext/extension_dict.cc +++ b/python/google/protobuf/pyext/extension_dict.cc @@ -53,7 +53,7 @@ #endif #define PyString_AsStringAndSize(ob, charpp, sizep) \ (PyUnicode_Check(ob)? \ - ((*(charpp) = PyUnicode_AsUTF8AndSize(ob, (sizep))) == NULL? -1: 0): \ + ((*(charpp) = const_cast(PyUnicode_AsUTF8AndSize(ob, (sizep)))) == NULL? -1: 0): \ PyBytes_AsStringAndSize(ob, (charpp), (sizep))) #endif -- 2.30.2