]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr: Change signature of PyString_AsString to match return 24092/head
authorBrad Hubbard <bhubbard@redhat.com>
Thu, 13 Sep 2018 03:19:02 +0000 (13:19 +1000)
committerBrad Hubbard <bhubbard@redhat.com>
Fri, 14 Sep 2018 00:10:40 +0000 (10:10 +1000)
PyUnicode_AsUTF8 now returns 'const char*'

Fixes: http://tracker.ceph.com/issues/35984
Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
src/mgr/PythonCompat.h

index 745dad1a7e7c0c8f548da80476b221ea3d2a12d8..7bbaf9c43cd146adbc313cc478ccc13952ba62c4 100644 (file)
@@ -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) {