003 File Manager
Current Path:
/usr/src/contrib/llvm-project/lldb/bindings
usr
/
src
/
contrib
/
llvm-project
/
lldb
/
bindings
/
📁
..
📄
headers.swig
(2.56 KB)
📁
interface
📄
interfaces.swig
(3.2 KB)
📁
lua
📄
lua.swig
(422 B)
📄
macros.swig
(887 B)
📁
python
📄
python.swig
(4.45 KB)
Editing: macros.swig
%define STRING_EXTENSION_LEVEL(Class, Level) %extend { %nothreadallow; std::string lldb:: ## Class ## ::__str__(){ lldb::SBStream stream; $self->GetDescription (stream, Level); const char *desc = stream.GetData(); size_t desc_len = stream.GetSize(); if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r')) { --desc_len; } return std::string(desc, desc_len); } %clearnothreadallow; } %enddef %define STRING_EXTENSION(Class) %extend { %nothreadallow; std::string lldb:: ## Class ## ::__str__(){ lldb::SBStream stream; $self->GetDescription (stream); const char *desc = stream.GetData(); size_t desc_len = stream.GetSize(); if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r')) { --desc_len; } return std::string(desc, desc_len); } %clearnothreadallow; } %enddef
Upload File
Create Folder