[Lldb-commits] [lldb] r179327 - Fixed SBValueList to have a __str__ function like all other SB classes. Previously this was done as __repr__.

Greg Clayton gclayton at apple.com
Thu Apr 11 15:24:25 PDT 2013


Author: gclayton
Date: Thu Apr 11 17:24:25 2013
New Revision: 179327

URL: http://llvm.org/viewvc/llvm-project?rev=179327&view=rev
Log:
Fixed SBValueList to have a __str__ function like all other SB classes. Previously this was done as __repr__.


Modified:
    lldb/trunk/scripts/Python/python-extensions.swig

Modified: lldb/trunk/scripts/Python/python-extensions.swig
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/python-extensions.swig?rev=179327&r1=179326&r2=179327&view=diff
==============================================================================
--- lldb/trunk/scripts/Python/python-extensions.swig (original)
+++ lldb/trunk/scripts/Python/python-extensions.swig Thu Apr 11 17:24:25 2013
@@ -489,7 +489,7 @@
         }
 }
 %extend lldb::SBValueList {
-        PyObject *lldb::SBValueList::__repr__ (){
+        PyObject *lldb::SBValueList::__str__ (){
                 lldb::SBStream description;
                 const size_t n = $self->GetSize();
                 if (n)
@@ -507,7 +507,8 @@
                     --desc_len;
                 if (desc_len > 0)
                     return PyString_FromStringAndSize (desc, desc_len);
-                return Py_None;
+                else
+                    return PyString_FromString("");
         }
 }
 %extend lldb::SBWatchpoint {





More information about the lldb-commits mailing list