[Lldb-commits] [lldb] r165274 - /lldb/trunk/scripts/Python/interface/SBStream.i

Enrico Granata egranata at apple.com
Thu Oct 4 16:54:09 PDT 2012


Author: enrico
Date: Thu Oct  4 18:54:09 2012
New Revision: 165274

URL: http://llvm.org/viewvc/llvm-project?rev=165274&view=rev
Log:
<rdar://problem/12099999> renaming SBStream::Printf to Print in the scripting world in order to avoid supporting varargs through SWIG

Modified:
    lldb/trunk/scripts/Python/interface/SBStream.i

Modified: lldb/trunk/scripts/Python/interface/SBStream.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/interface/SBStream.i?rev=165274&r1=165273&r2=165274&view=diff
==============================================================================
--- lldb/trunk/scripts/Python/interface/SBStream.i (original)
+++ lldb/trunk/scripts/Python/interface/SBStream.i Thu Oct  4 18:54:09 2012
@@ -68,9 +68,15 @@
     size_t
     GetSize();
 
-    void
-    Printf (const char *format, ...);
-
+    // wrapping the variadic Printf() with a plain Print()
+    // because it is hard to support varargs in SWIG bridgings
+    %extend {
+        void Print (const char* str)
+        {
+            self->Printf(str);
+        }
+    }
+    
     void
     RedirectToFile (const char *path, bool append);
 





More information about the lldb-commits mailing list