xref: /freebsd/contrib/llvm-project/lldb/bindings/interface/SBCommandReturnObjectExtensions.i (revision 06c3fb2749bda94cb5201f81ffdb8fa6c3161b2e)
1 STRING_EXTENSION_OUTSIDE(SBCommandReturnObject)
2 
3 %extend lldb::SBCommandReturnObject {
4     // transfer_ownership does nothing, and is here for compatibility with
5     // old scripts.  Ownership is tracked by reference count in the ordinary way.
6 
SetImmediateOutputFile(lldb::FileSP BORROWED,bool transfer_ownership)7     void SetImmediateOutputFile(lldb::FileSP BORROWED, bool transfer_ownership) {
8         self->SetImmediateOutputFile(BORROWED);
9     }
SetImmediateErrorFile(lldb::FileSP BORROWED,bool transfer_ownership)10     void SetImmediateErrorFile(lldb::FileSP BORROWED, bool transfer_ownership) {
11         self->SetImmediateErrorFile(BORROWED);
12     }
13 
14     // wrapping the variadic Printf() with a plain Print()
15     // because it is hard to support varargs in SWIG bridgings
Print(const char * str)16     void Print (const char* str)
17     {
18         self->Printf("%s", str);
19     }
20 }
21