Fixed bad NSGetFactory.

This commit is contained in:
tbogard%aol.net 1999-09-01 08:15:23 +00:00
parent b605bf26fe
commit c11bdf4df1
2 changed files with 5 additions and 5 deletions

View File

@ -49,7 +49,7 @@ NS_DEFINE_CID(kPosixLocaleFactoryCID,NS_POSIXLOCALEFACTORY_CID);
NS_DEFINE_IID(kIPosixLocaleIID, NS_IPOSIXLOCALE_IID);
#endif
NS_IMPL_ISUPPORTS(nsLocaleFactory,kILocaleFactoryIID)
NS_IMPL_ISUPPORTS2(nsLocaleFactory,nsIFactory, nsILocaleFactory)
#define LOCALE_CATEGORY_LISTLEN 6
char* localeCategoryList[LOCALE_CATEGORY_LISTLEN] =

View File

@ -87,7 +87,7 @@ extern "C" NS_EXPORT nsresult NSGetFactory(nsISupports* serviceMgr,
if (aClass.Equals(kLocaleFactoryCID))
{
factoryInstance = new nsLocaleFactory();
res = factoryInstance->QueryInterface(kILocaleFactoryIID, (void **) aFactory);
res = CallQueryInterface(factoryInstance, aFactory);
if (NS_FAILED(res))
{
@ -100,7 +100,7 @@ extern "C" NS_EXPORT nsresult NSGetFactory(nsISupports* serviceMgr,
if (aClass.Equals(kLocaleServiceCID)) {
factoryInstance = new nsLocaleServiceFactory();
res = factoryInstance->QueryInterface(kIFactoryIID,(void**)aFactory);
res = CallQueryInterface(factoryInstance, aFactory);
if (NS_FAILED(res)) { *aFactory=NULL; delete factoryInstance; }
return res;
}
@ -110,7 +110,7 @@ extern "C" NS_EXPORT nsresult NSGetFactory(nsISupports* serviceMgr,
if (aClass.Equals(kWin32LocaleFactoryCID))
{
factoryInstance = new nsIWin32LocaleFactory();
res = factoryInstance->QueryInterface(kIFactoryIID,(void**)aFactory);
res = CallQueryInterface(factoryInstance, aFactory);
if (NS_FAILED(res))
{
*aFactory=NULL;
@ -129,7 +129,7 @@ extern "C" NS_EXPORT nsresult NSGetFactory(nsISupports* serviceMgr,
return NS_ERROR_OUT_OF_MEMORY;
}
res = factoryInstance->QueryInterface(kIFactoryIID, (void**)aFactory);
res = CallQueryInterface(factoryInstance, aFactory);
if (NS_FAILED(res))
{
*aFactory = NULL;