1 %define STRING_EXTENSION_LEVEL_OUTSIDE(Class, Level)
2 %extend lldb:: ## Class ## {
3 std::string __repr__(){
5 $self->GetDescription (stream, Level);
6 const char *desc = stream.GetData();
7 size_t desc_len = stream.GetSize();
8 if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r')) {
11 return std::string(desc, desc_len);
16 %define STRING_EXTENSION_OUTSIDE(Class)
17 %extend lldb:: ## Class ## {
18 std::string __repr__(){
19 lldb::SBStream stream;
20 $self->GetDescription (stream);
21 const char *desc = stream.GetData();
22 size_t desc_len = stream.GetSize();
23 if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r')) {
26 return std::string(desc, desc_len);