Fixing nsrefcnt to be unsigned long to maintain binary compatibility. All Addref() and Release() prototypes modified appropriately

This commit is contained in:
dp%netscape.com 1999-05-28 04:53:17 +00:00
parent 7ae81ff69f
commit b21d1e72dc
5 changed files with 8 additions and 18 deletions

View File

@ -332,7 +332,7 @@ nsMsgDatabase::~nsMsgDatabase()
NS_IMPL_ADDREF(nsMsgDatabase)
NS_IMETHODIMP nsMsgDatabase::Release(void)
NS_IMETHODIMP_(nsrefcnt) nsMsgDatabase::Release(void)
{
NS_PRECONDITION(0 != mRefCnt, "dup release");
if (--mRefCnt == 0) // OK, the cache is no longer holding onto this, so we really want to delete it,

View File

@ -60,17 +60,12 @@ struct JSContext;
* To maintain binary compatibility of nsISupports with nsIUnknown, we are
* doing this ifdeffing.
*/
#if 0
// Disable this until mailnews and other code that has specific implementations
// of Release is fixed.
#if defined(XP_PC) && PR_BYTES_PER_LONG == 4
typedef unsigned long nsrefcnt;
#else
typedef PRUint32 nsrefcnt;
#endif
#else
typedef PRUint32 nsrefcnt;
#endif
/**
* Base class for all XPCOM objects to use. This macro forces the C++

View File

@ -60,17 +60,12 @@ struct JSContext;
* To maintain binary compatibility of nsISupports with nsIUnknown, we are
* doing this ifdeffing.
*/
#if 0
// Disable this until mailnews and other code that has specific implementations
// of Release is fixed.
#if defined(XP_PC) && PR_BYTES_PER_LONG == 4
typedef unsigned long nsrefcnt;
#else
typedef PRUint32 nsrefcnt;
#endif
#else
typedef PRUint32 nsrefcnt;
#endif
/**
* Base class for all XPCOM objects to use. This macro forces the C++

View File

@ -305,14 +305,14 @@ nsInstallTriggerFactory::QueryInterface(REFNSIID aIID,void** aInstancePtr)
NS_IMETHODIMP
NS_IMETHODIMP_(nsrefcnt)
nsInstallTriggerFactory::AddRef(void)
{
return ++mRefCnt;
}
NS_IMETHODIMP
NS_IMETHODIMP_(nsrefcnt)
nsInstallTriggerFactory::Release(void)
{
if (--mRefCnt ==0)

View File

@ -379,14 +379,14 @@ nsInstallVersionFactory::QueryInterface(REFNSIID aIID,void** aInstancePtr)
NS_IMETHODIMP
NS_IMETHODIMP_(nsrefcnt)
nsInstallVersionFactory::AddRef(void)
{
return ++mRefCnt;
}
NS_IMETHODIMP
NS_IMETHODIMP_(nsrefcnt)
nsInstallVersionFactory::Release(void)
{
if (--mRefCnt ==0)
@ -431,4 +431,4 @@ nsInstallVersionFactory::LockFactory(PRBool aLock)
PR_AtomicDecrement(&gInstallVersionLock);
return NS_OK;
}
}