This revision was automatically updated to reflect the committed changes. Closed by commit rGa59ed8fa8603: [lldb] Fix SBFileSpec.fullpath (authored by kastiglione).
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138348/new/ https://reviews.llvm.org/D138348 Files: lldb/bindings/interface/SBFileSpec.i Index: lldb/bindings/interface/SBFileSpec.i =================================================================== --- lldb/bindings/interface/SBFileSpec.i +++ lldb/bindings/interface/SBFileSpec.i @@ -84,18 +84,7 @@ #ifdef SWIGPYTHON %pythoncode %{ - def __get_fullpath__(self): - spec_dir = self.GetDirectory() - spec_file = self.GetFilename() - if spec_dir and spec_file: - return '%s/%s' % (spec_dir, spec_file) - elif spec_dir: - return spec_dir - elif spec_file: - return spec_file - return None - - fullpath = property(__get_fullpath__, None, doc='''A read only property that returns the fullpath as a python string.''') + fullpath = property(str, None, doc='''A read only property that returns the fullpath as a python string.''') basename = property(GetFilename, None, doc='''A read only property that returns the path basename as a python string.''') dirname = property(GetDirectory, None, doc='''A read only property that returns the path directory name as a python string.''') exists = property(Exists, None, doc='''A read only property that returns a boolean value that indicates if the file exists.''')
Index: lldb/bindings/interface/SBFileSpec.i =================================================================== --- lldb/bindings/interface/SBFileSpec.i +++ lldb/bindings/interface/SBFileSpec.i @@ -84,18 +84,7 @@ #ifdef SWIGPYTHON %pythoncode %{ - def __get_fullpath__(self): - spec_dir = self.GetDirectory() - spec_file = self.GetFilename() - if spec_dir and spec_file: - return '%s/%s' % (spec_dir, spec_file) - elif spec_dir: - return spec_dir - elif spec_file: - return spec_file - return None - - fullpath = property(__get_fullpath__, None, doc='''A read only property that returns the fullpath as a python string.''') + fullpath = property(str, None, doc='''A read only property that returns the fullpath as a python string.''') basename = property(GetFilename, None, doc='''A read only property that returns the path basename as a python string.''') dirname = property(GetDirectory, None, doc='''A read only property that returns the path directory name as a python string.''') exists = property(Exists, None, doc='''A read only property that returns a boolean value that indicates if the file exists.''')
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits