Get Python XPCOM bindings building with 1.4. Not part of the build.

git-svn-id: svn://10.0.0.236/trunk@140482 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mhammond%skippinet.com.au
2003-04-01 13:22:16 +00:00
parent 75c07438a8
commit 3191e2e247
4 changed files with 16 additions and 42 deletions

View File

@@ -29,7 +29,7 @@
#include "PyXPCOM_std.h"
#include "nsReadableUtils.h"
#include <nsFileStream.h>
#include <nsIConsoleService.h>
static char *PyTraceback_AsString(PyObject *exc_tb);
@@ -38,8 +38,10 @@ static char *PyTraceback_AsString(PyObject *exc_tb);
void LogMessage(const char *prefix, const char *pszMessageText)
{
nsOutputStream console;
console << prefix << pszMessageText;
nsCOMPtr<nsIConsoleService> consoleService = do_GetService(NS_CONSOLESERVICE_CONTRACTID);
NS_ABORT_IF_FALSE(consoleService, "Where is the console service?");
if (consoleService)
consoleService->LogStringMessage(NS_ConvertASCIItoUCS2(pszMessageText).get());
}
void LogMessage(const char *prefix, nsACString &text)