From 8c2fe4797cbb137cd8e96a556f238dc728d438af Mon Sep 17 00:00:00 2001 From: Davide Italiano Date: Wed, 9 Jan 2019 22:52:47 +0000 Subject: [Python] Update PyString_FromString() to work for python 2 and 3. Reviewers: aprantl, JDevlieghere, friss, zturner Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D56511 llvm-svn: 350769 --- lldb/scripts/Python/python-wrapper.swig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lldb/scripts/Python/python-wrapper.swig') diff --git a/lldb/scripts/Python/python-wrapper.swig b/lldb/scripts/Python/python-wrapper.swig index e6a6b7a..8509899 100644 --- a/lldb/scripts/Python/python-wrapper.swig +++ b/lldb/scripts/Python/python-wrapper.swig @@ -826,7 +826,9 @@ LLDBSwigPython_GetRecognizedArguments lldb::SBFrame frame_sb(frame_sp); PyObject *arg = SBTypeToSWIGWrapper(frame_sb); - PyObject* result = PyObject_CallMethodObjArgs(implementor, PyString_FromString(callee_name), arg, NULL); + PythonString str(callee_name); + PyObject* result = PyObject_CallMethodObjArgs(implementor, str.get(), arg, + NULL); return result; } -- cgit v1.1