Changes to Python commands:
 - They now have an SBCommandReturnObject instead of an SBStream as third argument
 - The class CommandObjectPythonFunction has been merged into CommandObjectCommands.cpp
 - The command to manage them is now:
  command script with subcommands add, list, delete, clear
   command alias is returned to its previous functionality
 - Python commands are now part of an user dictionary, instead of being seen as aliases
 


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137785 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/API/SBCommandInterpreter.cpp b/source/API/SBCommandInterpreter.cpp
index cd7cefd..5b3371b 100644
--- a/source/API/SBCommandInterpreter.cpp
+++ b/source/API/SBCommandInterpreter.cpp
@@ -344,7 +344,7 @@
     lldb::DebuggerSP& debugger,
     const char* args,
     std::string& err_msg,
-    lldb::SBStream& stream
+    lldb_private::CommandReturnObject& cmd_retobj
 );
 
 
diff --git a/source/API/SBCommandReturnObject.cpp b/source/API/SBCommandReturnObject.cpp
index 8377c1f..8550b5d 100644
--- a/source/API/SBCommandReturnObject.cpp
+++ b/source/API/SBCommandReturnObject.cpp
@@ -248,3 +248,27 @@
     if (m_opaque_ap.get())
         m_opaque_ap->SetImmediateErrorFile (fh);
 }
+
+void
+SBCommandReturnObject::PutCString(const char* string, int len)
+{
+    if (m_opaque_ap.get())
+    {
+        m_opaque_ap->AppendMessage(string, len);
+    }
+}
+
+size_t
+SBCommandReturnObject::Printf(const char* format, ...)
+{
+    if (m_opaque_ap.get())
+    {
+        va_list args;
+        va_start (args, format);
+        size_t result = m_opaque_ap->GetOutputStream().PrintfVarArg(format, args);
+        va_end (args);
+        return result;
+    }
+    return 0;
+}
+