From 9563568ae711e50d9fbb2ef97a357aa7a8a5302e Mon Sep 17 00:00:00 2001 From: "mscott%netscape.com" Date: Tue, 6 Apr 1999 03:10:17 +0000 Subject: [PATCH] NS_NewMsgAppCore takes an IID & refcounts returned object --- mailnews/base/src/nsMsgAppCore.cpp | 12 +++++------- mailnews/base/src/nsMsgAppCore.h | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/mailnews/base/src/nsMsgAppCore.cpp b/mailnews/base/src/nsMsgAppCore.cpp index 42b4b6d5cf22..73fa5573a2f4 100644 --- a/mailnews/base/src/nsMsgAppCore.cpp +++ b/mailnews/base/src/nsMsgAppCore.cpp @@ -448,17 +448,15 @@ nsMsgAppCore::GetNewMail() extern "C" nsresult -NS_NewMsgAppCore(nsIDOMMsgAppCore **aResult) +NS_NewMsgAppCore(const nsIID &aIID, void **aResult) { if (!aResult) return NS_ERROR_NULL_POINTER; nsMsgAppCore *appcore = new nsMsgAppCore(); - if (appcore) { - return appcore->QueryInterface(nsIDOMMsgAppCore::GetIID(), - (void **)aResult); - - } - return NS_ERROR_NOT_INITIALIZED; + if (appcore) + return appcore->QueryInterface(aIID, (void **)aResult); + else + return NS_ERROR_NOT_INITIALIZED; } diff --git a/mailnews/base/src/nsMsgAppCore.h b/mailnews/base/src/nsMsgAppCore.h index ae2446b0d6ed..320eda49b41a 100644 --- a/mailnews/base/src/nsMsgAppCore.h +++ b/mailnews/base/src/nsMsgAppCore.h @@ -30,7 +30,7 @@ NS_BEGIN_EXTERN_C nsresult -NS_NewMsgAppCore(nsIDOMMsgAppCore **); +NS_NewMsgAppCore(const nsIID &aIID, void **); NS_END_EXTERN_C