<rdar://problem/11742979>
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
diff --git a/lldb/scripts/Python/interface/SBSymbol.i b/lldb/scripts/Python/interface/SBSymbol.i
index a2cec0e..f6db14c 100644
--- a/lldb/scripts/Python/interface/SBSymbol.i
+++ b/lldb/scripts/Python/interface/SBSymbol.i
@@ -62,6 +62,12 @@
bool
IsSynthetic();
+ bool
+ operator == (const lldb::SBSymbol &rhs) const;
+
+ bool
+ operator != (const lldb::SBSymbol &rhs) const;
+
%pythoncode %{
def get_instructions_from_current_target (self):
return self.GetInstructions (target)