@@ -33,33 +33,6 @@ class ScriptedPythonInterface : virtual public ScriptedInterface {
33
33
return p.CreateStructuredObject ();
34
34
}
35
35
36
- template <>
37
- Status ExtractValueFromPythonObject<Status>(python::PythonObject &p,
38
- Status &error) {
39
- if (lldb::SBError *sb_error = reinterpret_cast <lldb::SBError *>(
40
- LLDBSWIGPython_CastPyObjectToSBError (p.get ())))
41
- error = m_interpreter.GetStatusFromSBError (*sb_error);
42
- else
43
- error.SetErrorString (" Couldn't cast lldb::SBError to lldb::Status." );
44
-
45
- return error;
46
- }
47
-
48
- template <>
49
- lldb::DataExtractorSP
50
- ExtractValueFromPythonObject<lldb::DataExtractorSP>(python::PythonObject &p,
51
- Status &error) {
52
- lldb::SBData *sb_data = reinterpret_cast <lldb::SBData *>(
53
- LLDBSWIGPython_CastPyObjectToSBData (p.get ()));
54
-
55
- if (!sb_data) {
56
- error.SetErrorString (" Couldn't cast lldb::SBError to lldb::Status." );
57
- return nullptr ;
58
- }
59
-
60
- return m_interpreter.GetDataExtractorFromSBData (*sb_data);
61
- }
62
-
63
36
template <typename T = StructuredData::ObjectSP, typename ... Args>
64
37
T Dispatch (llvm::StringRef method_name, Status &error, Args... args) {
65
38
using namespace python ;
@@ -149,6 +122,16 @@ class ScriptedPythonInterface : virtual public ScriptedInterface {
149
122
// The lifetime is managed by the ScriptInterpreter
150
123
ScriptInterpreterPythonImpl &m_interpreter;
151
124
};
125
+
126
+ template <>
127
+ Status ScriptedPythonInterface::ExtractValueFromPythonObject<Status>(
128
+ python::PythonObject &p, Status &error);
129
+
130
+ template <>
131
+ lldb::DataExtractorSP
132
+ ScriptedPythonInterface::ExtractValueFromPythonObject<lldb::DataExtractorSP>(
133
+ python::PythonObject &p, Status &error);
134
+
152
135
} // namespace lldb_private
153
136
154
137
#endif // LLDB_ENABLE_PYTHON
0 commit comments