From c3387333ced81f6ef83b9022c5bde4a42bba05fa Mon Sep 17 00:00:00 2001 From: Enrico Granata Date: Fri, 3 May 2013 01:29:27 +0000 Subject: SWIG is smart enough to recognize that C++ operators == and != mean __eq__ and __ne__ in Python and do the appropriate translation But it is not smart enough to recognize that mySBObject == None should return False instead of erroring out The %pythoncode blocks are meant to provide those extra smarts (and they play some SWIG&Python magic to find the right function to call behind the scenes with no risk of typos :-) Lastly, SBBreakpoint provides an == but never provided a != operator - common courtesy is to provide both llvm-svn: 180987 --- lldb/scripts/Python/interface/SBBreakpoint.i | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lldb/scripts/Python/interface/SBBreakpoint.i') diff --git a/lldb/scripts/Python/interface/SBBreakpoint.i b/lldb/scripts/Python/interface/SBBreakpoint.i index cf566d2ac51..08a1f9684af 100644 --- a/lldb/scripts/Python/interface/SBBreakpoint.i +++ b/lldb/scripts/Python/interface/SBBreakpoint.i @@ -189,6 +189,12 @@ public: bool GetDescription (lldb::SBStream &description); + bool + operator == (const lldb::SBBreakpoint& rhs); + + bool + operator != (const lldb::SBBreakpoint& rhs); + static bool EventIsBreakpointEvent (const lldb::SBEvent &event); -- cgit v1.2.3