diff options
| author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-07-02 22:18:35 +0000 |
|---|---|---|
| committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-07-02 22:18:35 +0000 |
| commit | 89b658428bae3b749f174ca79f0fe390451d8f69 (patch) | |
| tree | 1b02a3af90f9be9c3bc27fecdf67bbb5c1443fb2 /lldb/scripts/interface/SBExecutionContext.i | |
| parent | 54c7907f52eaefbfa33c741008d2124f7d62bb99 (diff) | |
| download | bcm5719-llvm-89b658428bae3b749f174ca79f0fe390451d8f69.tar.gz bcm5719-llvm-89b658428bae3b749f174ca79f0fe390451d8f69.zip | |
[swig] Don't mess with swig internals.
As of SWIG 4.0, __swig_getmethods__ and __swig_setmethods__ are no
longer defined. It appears that there's no need to mess with these
internals, we can simplify define the corresponding properties inline.
Originally I wanted to use the swig extension %attribute and
%attributeref to define properties. However, I couldn't find a way to
add documentation to these attributes. Since we already had the
properties defined inline, we might as well keep them.
Differential revision: https://reviews.llvm.org/D63530
llvm-svn: 364974
Diffstat (limited to 'lldb/scripts/interface/SBExecutionContext.i')
| -rw-r--r-- | lldb/scripts/interface/SBExecutionContext.i | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/lldb/scripts/interface/SBExecutionContext.i b/lldb/scripts/interface/SBExecutionContext.i index 8ffa1f8a354..9e8d22b3728 100644 --- a/lldb/scripts/interface/SBExecutionContext.i +++ b/lldb/scripts/interface/SBExecutionContext.i @@ -38,17 +38,10 @@ public: GetFrame () const; %pythoncode %{ - __swig_getmethods__["target"] = GetTarget - if _newclass: target = property(GetTarget, None, doc='''A read only property that returns the same result as GetTarget().''') - - __swig_getmethods__["process"] = GetProcess - if _newclass: process = property(GetProcess, None, doc='''A read only property that returns the same result as GetProcess().''') - - __swig_getmethods__["thread"] = GetThread - if _newclass: thread = property(GetThread, None, doc='''A read only property that returns the same result as GetThread().''') - - __swig_getmethods__["frame"] = GetFrame - if _newclass: frame = property(GetFrame, None, doc='''A read only property that returns the same result as GetFrame().''') + target = property(GetTarget, None, doc='''A read only property that returns the same result as GetTarget().''') + process = property(GetProcess, None, doc='''A read only property that returns the same result as GetProcess().''') + thread = property(GetThread, None, doc='''A read only property that returns the same result as GetThread().''') + frame = property(GetFrame, None, doc='''A read only property that returns the same result as GetFrame().''') %} }; |

