File tree Expand file tree Collapse file tree 1 file changed +0
-34
lines changed Expand file tree Collapse file tree 1 file changed +0
-34
lines changed Original file line number Diff line number Diff line change 1
- %define STRING_EXTENSION_LEVEL(Class, Level)
2
- %extend {
3
- std::string lldb:: ## Class ## ::__repr__(){
4
- lldb::SBStream stream;
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')) {
9
- --desc_len;
10
- }
11
- return std::string(desc, desc_len);
12
- }
13
- }
14
- %enddef
15
-
16
1
%define STRING_EXTENSION_LEVEL_OUTSIDE(Class, Level)
17
2
%extend lldb:: ## Class ## {
18
3
std::string __repr__(){
28
13
}
29
14
%enddef
30
15
31
- %define STRING_EXTENSION(Class)
32
- %extend {
33
- std::string lldb:: ## Class ## ::__repr__(){
34
- lldb::SBStream stream;
35
- $self->GetDescription (stream);
36
- const char *desc = stream.GetData();
37
- size_t desc_len = stream.GetSize();
38
- if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r')) {
39
- --desc_len;
40
- }
41
- return std::string(desc, desc_len);
42
- }
43
- }
44
- %enddef
45
-
46
- // NOTE:
47
- // This is for when you are peforming the extension from outside of the class
48
- // instead of inside of it. If this change works out, it will replace
49
- // STRING_EXTENSION entirely.
50
16
%define STRING_EXTENSION_OUTSIDE(Class)
51
17
%extend lldb:: ## Class ## {
52
18
std::string __repr__(){
You can’t perform that action at this time.
0 commit comments