summaryrefslogtreecommitdiffstats
path: root/lldb/scripts/interface/SBModule.i
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2019-12-08 14:46:48 -0800
committerJonas Devlieghere <jonas@devlieghere.com>2019-12-08 14:48:51 -0800
commit0a5703458b7f577f628ca123a47c209653f19dc2 (patch)
tree74f486ec0f7013bed58ff18fc3cc444a7797764f /lldb/scripts/interface/SBModule.i
parent9fdb7ac503a964b128ec909fbf95443c3ea279a4 (diff)
downloadbcm5719-llvm-0a5703458b7f577f628ca123a47c209653f19dc2.tar.gz
bcm5719-llvm-0a5703458b7f577f628ca123a47c209653f19dc2.zip
[lldb/SWIG] Guard embedded Python code in SWIG interfaces by SWIGPYTHON
Guard the embedded Python code in LLDB's interface files by the SWIGPYTHON define to ensures they can be reused for other languages supported by SWIG.
Diffstat (limited to 'lldb/scripts/interface/SBModule.i')
-rw-r--r--lldb/scripts/interface/SBModule.i4
1 files changed, 4 insertions, 0 deletions
diff --git a/lldb/scripts/interface/SBModule.i b/lldb/scripts/interface/SBModule.i
index 06a4628d52b..03c8aeb2bed 100644
--- a/lldb/scripts/interface/SBModule.i
+++ b/lldb/scripts/interface/SBModule.i
@@ -8,6 +8,7 @@
namespace lldb {
+#ifdef SWIGPYTHON
%pythoncode%{
# ==================================
# Helper function for SBModule class
@@ -30,6 +31,7 @@ def in_range(symbol, section):
else:
return False
%}
+#endif
%feature("docstring",
"Represents an executable image and its associated object and symbol files.
@@ -342,6 +344,7 @@ public:
lldb::SBAddress
GetObjectFileEntryPointAddress() const;
+#ifdef SWIGPYTHON
%pythoncode %{
def __len__(self):
'''Return the number of symbols in a lldb.SBModule object.'''
@@ -542,6 +545,7 @@ public:
num_sections = property(GetNumSections, None, doc='''A read only property that returns number of sections in the module as an integer.''')
%}
+#endif
};
OpenPOWER on IntegriCloud