diff options
author | Greg Clayton <gclayton@apple.com> | 2012-08-24 05:45:15 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2012-08-24 05:45:15 +0000 |
commit | 435ce13937537261e92578c2a1d476c465666b99 (patch) | |
tree | 24e48d2db905d45069272baee689027f3126a12e /lldb/source/Interpreter/PythonDataObjects.cpp | |
parent | 98e00797cdaf5f7e3c77378a2cb7993b0adfedee (diff) | |
download | bcm5719-llvm-435ce13937537261e92578c2a1d476c465666b99.tar.gz bcm5719-llvm-435ce13937537261e92578c2a1d476c465666b99.zip |
The OS plug-in can now get data from a python script that implements the protocol.
llvm-svn: 162540
Diffstat (limited to 'lldb/source/Interpreter/PythonDataObjects.cpp')
-rw-r--r-- | lldb/source/Interpreter/PythonDataObjects.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lldb/source/Interpreter/PythonDataObjects.cpp b/lldb/source/Interpreter/PythonDataObjects.cpp index c41772cd208..6d345d71c1b 100644 --- a/lldb/source/Interpreter/PythonDataObjects.cpp +++ b/lldb/source/Interpreter/PythonDataObjects.cpp @@ -123,13 +123,21 @@ PythonDataString::~PythonDataString () } const char* -PythonDataString::GetString() +PythonDataString::GetString() const { if (m_object) return PyString_AsString(GetPythonObject()); return NULL; } +size_t +PythonDataString::GetSize() const +{ + if (m_object) + return PyString_Size(GetPythonObject()); + return 0; +} + void PythonDataString::SetString (const char* string) { |