From f38d269716cbfde5fcac2de7773c29e109a83c45 Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Wed, 17 Jul 2019 10:16:20 +0200 Subject: [PATCH] Python3.7 : PyUnicode_AsUTF8AndSize returns const char * --- src/MEDCoupling_Swig/MEDCouplingMemArray.i | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/MEDCoupling_Swig/MEDCouplingMemArray.i b/src/MEDCoupling_Swig/MEDCouplingMemArray.i index 0c1d416d2..f096deb75 100644 --- a/src/MEDCoupling_Swig/MEDCouplingMemArray.i +++ b/src/MEDCoupling_Swig/MEDCouplingMemArray.i @@ -5836,7 +5836,7 @@ namespace MEDCoupling if(PyUnicode_Check(obj)) { Py_ssize_t sz; - char *pt=PyUnicode_AsUTF8AndSize(obj, &sz); + const char *pt=PyUnicode_AsUTF8AndSize(obj, &sz); if(sz==1) return self->findIdFirstEqual(pt[0]); else @@ -5873,7 +5873,7 @@ namespace MEDCoupling if(PyUnicode_Check(obj)) { Py_ssize_t sz; - char *pt=PyUnicode_AsUTF8AndSize(obj, &sz); + const char *pt=PyUnicode_AsUTF8AndSize(obj, &sz); if(sz==1) return self->presenceOfValue(pt[0]); else -- 2.39.2