[lldb] Fix 'error: non-const lvalue...' caused by SWIG 4.1.0
authorJitka Plesnikova <jplesnik@redhat.com>
Wed, 21 Sep 2022 09:42:46 +0000 (11:42 +0200)
committerserge-sans-paille <sguelton@redhat.com>
Fri, 30 Sep 2022 12:37:29 +0000 (14:37 +0200)
Fix the failure caused by change in SwigValueWraper for C++11 and later
for improved move semantics in SWIG commit.

https://github.com/swig/swig/commit/d1055f4b3d51cb8060893f8036846ac743302dab

lldb/bindings/python/python-typemaps.swig

index 203be80..11f68d5 100644 (file)
@@ -435,7 +435,7 @@ template <> bool SetNumberFromPyObject<double>(double &number, PyObject *obj) {
 
 %typemap(out) lldb::FileSP {
   $result = nullptr;
-  lldb::FileSP &sp = $1;
+  const lldb::FileSP &sp = $1;
   if (sp) {
     PythonFile pyfile = unwrapOrSetPythonException(PythonFile::FromFile(*sp));
     if (!pyfile.IsValid())