ceph/0003-mgr-Change-signature-o...

33 lines
998 B
Diff

From 9fa9fbe96deb565188ba6740c3200a67c499d68a Mon Sep 17 00:00:00 2001
From: Brad Hubbard <bhubbard@redhat.com>
Date: Thu, 13 Sep 2018 13:19:02 +1000
Subject: [PATCH 3/4] 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 <bhubbard@redhat.com>
(cherry picked from commit b29c65623f508082ded87af6f8d068ce8882f936)
---
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 745dad1a7e..7bbaf9c43c 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.19.1