From b29c65623f508082ded87af6f8d068ce8882f936 Mon Sep 17 00:00:00 2001 From: Brad Hubbard Date: Thu, 13 Sep 2018 13:19:02 +1000 Subject: [PATCH] mgr: Change signature of PyString_AsString to match return PyUnicode_AsUTF8 now returns 'const char*' Fixes: http://tracker.ceph.com/issues/35984 Signed-off-by: Brad Hubbard --- src/mgr/PythonCompat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mgr/PythonCompat.h b/src/mgr/PythonCompat.h index 745dad1a7e7c0..7bbaf9c43cd14 100644 --- a/src/mgr/PythonCompat.h +++ b/src/mgr/PythonCompat.h @@ -13,7 +13,7 @@ inline PyObject* PyString_FromString(const char *v) { return PyUnicode_FromFormat("%s", v); } -inline char* PyString_AsString(PyObject *string) { +inline const char* PyString_AsString(PyObject *string) { return PyUnicode_AsUTF8(string); } inline long PyInt_AsLong(PyObject *io) { -- 2.39.5