From 04d9798734ddee04be1a0c3c86c05f81377dd23a Mon Sep 17 00:00:00 2001 From: "mkaply%us.ibm.com" Date: Tue, 27 Mar 2001 22:59:33 +0000 Subject: [PATCH] #73620 r=jband, sr=brendan Fix some places where we used casts instead of CALLBACKs git-svn-id: svn://10.0.0.236/trunk@90568 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/js/src/xpconnect/src/xpcjsruntime.cpp | 2 +- mozilla/js/src/xpconnect/src/xpcprivate.h | 2 +- mozilla/netwerk/mime/src/nsXMLMIMEDataSource.cpp | 4 ++-- mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp | 4 ++-- mozilla/xpcom/base/nsErrorService.cpp | 6 +++--- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/mozilla/js/src/xpconnect/src/xpcjsruntime.cpp b/mozilla/js/src/xpconnect/src/xpcjsruntime.cpp index 1de36f5b64c..d6544cea23b 100644 --- a/mozilla/js/src/xpconnect/src/xpcjsruntime.cpp +++ b/mozilla/js/src/xpconnect/src/xpcjsruntime.cpp @@ -261,7 +261,7 @@ XPCJSRuntime::XPCJSRuntime(nsXPConnect* aXPConnect, NS_ASSERTION(!gOldJSGCCallback, "XPCJSRuntime created more than once"); if(mJSRuntime) - gOldJSGCCallback = JS_SetGCCallbackRT(mJSRuntime, (JSGCCallback)GCCallback); + gOldJSGCCallback = JS_SetGCCallbackRT(mJSRuntime, GCCallback); // Install a JavaScript 'debugger' keyword handler in debug builds only #ifdef DEBUG diff --git a/mozilla/js/src/xpconnect/src/xpcprivate.h b/mozilla/js/src/xpconnect/src/xpcprivate.h index c9213984f4b..99096970dbd 100644 --- a/mozilla/js/src/xpconnect/src/xpcprivate.h +++ b/mozilla/js/src/xpconnect/src/xpcprivate.h @@ -255,7 +255,7 @@ public: return mStrings[index]; } - static JSBool GCCallback(JSContext *cx, JSGCStatus status); + static JSBool JS_DLL_CALLBACK GCCallback(JSContext *cx, JSGCStatus status); void DebugDump(PRInt16 depth); diff --git a/mozilla/netwerk/mime/src/nsXMLMIMEDataSource.cpp b/mozilla/netwerk/mime/src/nsXMLMIMEDataSource.cpp index f2b9c270cbc..c864027005a 100644 --- a/mozilla/netwerk/mime/src/nsXMLMIMEDataSource.cpp +++ b/mozilla/netwerk/mime/src/nsXMLMIMEDataSource.cpp @@ -53,7 +53,7 @@ const char* kMacType="mactype"; static NS_DEFINE_CID(kFileTransportServiceCID, NS_FILETRANSPORTSERVICE_CID); // Hash table helper functions -static PRBool DeleteEntry(nsHashKey *aKey, void *aData, void* closure) { +static PRBool PR_CALLBACK DeleteEntry(nsHashKey *aKey, void *aData, void* closure) { nsMIMEInfoImpl *entry = (nsMIMEInfoImpl*)aData; NS_ASSERTION(entry, "mapping problem"); NS_RELEASE(entry); @@ -81,7 +81,7 @@ nsXMLMIMEDataSource::nsXMLMIMEDataSource() { } nsXMLMIMEDataSource::~nsXMLMIMEDataSource() { - mInfoObjects->Reset((nsHashtableEnumFunc)DeleteEntry, nsnull); + mInfoObjects->Reset(DeleteEntry, nsnull); delete mInfoObjects; } diff --git a/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp b/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp index 794119d5482..4c88aaae0bc 100644 --- a/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp +++ b/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp @@ -68,7 +68,7 @@ static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID); static NS_DEFINE_CID(kRDFXMLDataSourceCID, NS_RDFXMLDATASOURCE_CID); // forward declaration of a private helper function -static PRBool DeleteEntry(nsHashKey *aKey, void *aData, void* closure); +static PRBool PR_CALLBACK DeleteEntry(nsHashKey *aKey, void *aData, void* closure); // The following static table lists all of the "default" content type mappings we are going to use. static nsDefaultMimeTypeEntry defaultMimeEntries [] = @@ -129,7 +129,7 @@ nsExternalHelperAppService::~nsExternalHelperAppService() { if (mMimeInfoCache) { - mMimeInfoCache->Reset((nsHashtableEnumFunc)DeleteEntry, nsnull); + mMimeInfoCache->Reset(DeleteEntry, nsnull); delete mMimeInfoCache; } } diff --git a/mozilla/xpcom/base/nsErrorService.cpp b/mozilla/xpcom/base/nsErrorService.cpp index 583664b1be1..3371a5eb4f5 100644 --- a/mozilla/xpcom/base/nsErrorService.cpp +++ b/mozilla/xpcom/base/nsErrorService.cpp @@ -23,13 +23,13 @@ #include "nsErrorService.h" #include "nsCRT.h" -static void* +static void* PR_CALLBACK CloneCString(nsHashKey *aKey, void *aData, void* closure) { return nsCRT::strdup((const char*)aData); } -static PRBool +static PRBool PR_CALLBACK DeleteCString(nsHashKey *aKey, void *aData, void* closure) { nsCRT::free((char*)aData); @@ -37,7 +37,7 @@ DeleteCString(nsHashKey *aKey, void *aData, void* closure) } nsInt2StrHashtable::nsInt2StrHashtable() - : mHashtable((nsHashtableCloneElementFunc)CloneCString, nsnull, (nsHashtableEnumFunc)DeleteCString, nsnull, 16) + : mHashtable(CloneCString, nsnull, DeleteCString, nsnull, 16) { }