<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
This commit is contained in:
Enrico Granata
2013-05-03 01:29:27 +00:00
parent 57f745ec96
commit c3387333ce
19 changed files with 320 additions and 2 deletions

View File

@@ -279,6 +279,12 @@ public:
GetVersion (uint32_t *versions,
uint32_t num_versions);
bool
operator == (const lldb::SBModule &rhs) const;
bool
operator != (const lldb::SBModule &rhs) const;
%pythoncode %{
class symbols_access(object):
re_compile_type = type(re.compile('.'))