зеркало из https://github.com/mozilla/gecko-dev.git
r=beard, sr=brendan Remove CRT_CALL - change to PR_CALLBACK or JS_DLL_CALLBACK appropriately
This commit is contained in:
Родитель
0280bf2a97
Коммит
5f5b489750
|
@ -85,7 +85,7 @@ struct ModulesEntry {
|
|||
Node* byCount;
|
||||
};
|
||||
|
||||
BOOL CRT_CALL
|
||||
BOOL PR_CALLBACK
|
||||
ModuleMatchEntry(PLDHashTable* aTable,
|
||||
const PLDHashEntryHdr* aEntry,
|
||||
const void* aKey)
|
||||
|
@ -156,9 +156,9 @@ void _penter()
|
|||
win32.order
|
||||
*/
|
||||
|
||||
static PLDHashOperator CRT_CALL
|
||||
static PLDHashOperator PR_CALLBACK
|
||||
DumpFiles(PLDHashTable* table, PLDHashEntryHdr* hdr,
|
||||
PRUint32 number, void* arg)
|
||||
PRUint32 number, void* arg)
|
||||
{
|
||||
ModulesEntry* entry = (ModulesEntry*) hdr;
|
||||
Node* cur = entry->byCount;
|
||||
|
@ -196,7 +196,7 @@ DumpFiles(PLDHashTable* table, PLDHashEntryHdr* hdr,
|
|||
function and its call count into the module's sorted list.
|
||||
*/
|
||||
|
||||
static PLDHashOperator CRT_CALL
|
||||
static PLDHashOperator PR_CALLBACK
|
||||
ListCounts(PLDHashTable* table, PLDHashEntryHdr* hdr,
|
||||
PRUint32 number, void* arg)
|
||||
{
|
||||
|
|
|
@ -54,13 +54,13 @@ extern PRLogModuleInfo* gXULTemplateLog;
|
|||
// nsRuleNetwork
|
||||
//
|
||||
|
||||
static PLDHashNumber CRT_CALL
|
||||
static PLDHashNumber PR_CALLBACK
|
||||
HashEntry(PLDHashTable* aTable, const void* aKey)
|
||||
{
|
||||
return nsCRT::HashCode(NS_STATIC_CAST(const PRUnichar*, aKey));
|
||||
}
|
||||
|
||||
static PRBool CRT_CALL
|
||||
static PRBool PR_CALLBACK
|
||||
MatchEntry(PLDHashTable* aTable, const PLDHashEntryHdr* aEntry, const void* aKey)
|
||||
{
|
||||
const nsRuleNetwork::SymtabEntry* entry =
|
||||
|
@ -69,7 +69,7 @@ MatchEntry(PLDHashTable* aTable, const PLDHashEntryHdr* aEntry, const void* aKey
|
|||
return 0 == nsCRT::strcmp(entry->mSymbol, NS_STATIC_CAST(const PRUnichar*, aKey));
|
||||
}
|
||||
|
||||
static void CRT_CALL
|
||||
static void PR_CALLBACK
|
||||
ClearEntry(PLDHashTable* aTable, PLDHashEntryHdr* aEntry)
|
||||
{
|
||||
nsRuleNetwork::SymtabEntry* entry =
|
||||
|
@ -79,14 +79,14 @@ ClearEntry(PLDHashTable* aTable, PLDHashEntryHdr* aEntry)
|
|||
PL_DHashClearEntryStub(aTable, aEntry);
|
||||
}
|
||||
|
||||
static PLDHashOperator CRT_CALL
|
||||
static PLDHashOperator PR_CALLBACK
|
||||
RemoveEach(PLDHashTable* aTable, PLDHashEntryHdr* aEntry, PRUint32 aNumber, void* aArg)
|
||||
{
|
||||
return PL_DHASH_REMOVE;
|
||||
}
|
||||
|
||||
|
||||
static void CRT_CALL
|
||||
static void PR_CALLBACK
|
||||
FinalizeTable(PLDHashTable* aTable)
|
||||
{
|
||||
PL_DHashTableEnumerate(aTable, RemoveEach, nsnull);
|
||||
|
|
|
@ -551,7 +551,7 @@ JS_DumpNamedRoots(JSRuntime *rt,
|
|||
#define JS_MAP_GCROOT_REMOVE 2 /* remove and free the current entry */
|
||||
|
||||
typedef intN
|
||||
(* CRT_CALL JSGCRootMapFun)(void *rp, const char *name, void *data);
|
||||
(* JS_DLL_CALLBACK JSGCRootMapFun)(void *rp, const char *name, void *data);
|
||||
|
||||
extern JS_PUBLIC_API(intN)
|
||||
JS_MapGCRoots(JSRuntime *rt, JSGCRootMapFun map, void *data);
|
||||
|
|
|
@ -186,24 +186,16 @@ struct JSDHashTable {
|
|||
#endif
|
||||
};
|
||||
|
||||
#ifndef CRT_CALL
|
||||
#ifdef XP_OS2_VACPP
|
||||
#define CRT_CALL _Optlink
|
||||
#else
|
||||
#define CRT_CALL
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Table space at entryStore is allocated and freed using these callbacks.
|
||||
* The allocator should return null on error only (not if called with nbytes
|
||||
* equal to 0; but note that jsdhash.c code will never call with 0 nbytes).
|
||||
*/
|
||||
typedef void *
|
||||
(* CRT_CALL JSDHashAllocTable)(JSDHashTable *table, uint32 nbytes);
|
||||
(* JS_DLL_CALLBACK JSDHashAllocTable)(JSDHashTable *table, uint32 nbytes);
|
||||
|
||||
typedef void
|
||||
(* CRT_CALL JSDHashFreeTable) (JSDHashTable *table, void *ptr);
|
||||
(* JS_DLL_CALLBACK JSDHashFreeTable) (JSDHashTable *table, void *ptr);
|
||||
|
||||
/*
|
||||
* When a table grows or shrinks, each entry is queried for its key using this
|
||||
|
@ -212,23 +204,23 @@ typedef void
|
|||
* moved via moveEntry callbacks.
|
||||
*/
|
||||
typedef const void *
|
||||
(* CRT_CALL JSDHashGetKey) (JSDHashTable *table, JSDHashEntryHdr *entry);
|
||||
(* JS_DLL_CALLBACK JSDHashGetKey) (JSDHashTable *table, JSDHashEntryHdr *entry);
|
||||
|
||||
/*
|
||||
* Compute the hash code for a given key to be looked up, added, or removed
|
||||
* from table. A hash code may have any JSDHashNumber value.
|
||||
*/
|
||||
typedef JSDHashNumber
|
||||
(* CRT_CALL JSDHashHashKey) (JSDHashTable *table, const void *key);
|
||||
(* JS_DLL_CALLBACK JSDHashHashKey) (JSDHashTable *table, const void *key);
|
||||
|
||||
/*
|
||||
* Compare the key identifying entry in table with the provided key parameter.
|
||||
* Return JS_TRUE if keys match, JS_FALSE otherwise.
|
||||
*/
|
||||
typedef JSBool
|
||||
(* CRT_CALL JSDHashMatchEntry)(JSDHashTable *table,
|
||||
const JSDHashEntryHdr *entry,
|
||||
const void *key);
|
||||
(* JS_DLL_CALLBACK JSDHashMatchEntry)(JSDHashTable *table,
|
||||
const JSDHashEntryHdr *entry,
|
||||
const void *key);
|
||||
|
||||
/*
|
||||
* Copy the data starting at from to the new entry storage at to. Do not add
|
||||
|
@ -237,9 +229,9 @@ typedef JSBool
|
|||
* any reference-decrementing callback shortly.
|
||||
*/
|
||||
typedef void
|
||||
(* CRT_CALL JSDHashMoveEntry)(JSDHashTable *table,
|
||||
const JSDHashEntryHdr *from,
|
||||
JSDHashEntryHdr *to);
|
||||
(* JS_DLL_CALLBACK JSDHashMoveEntry)(JSDHashTable *table,
|
||||
const JSDHashEntryHdr *from,
|
||||
JSDHashEntryHdr *to);
|
||||
|
||||
/*
|
||||
* Clear the entry and drop any strong references it holds. This callback is
|
||||
|
@ -247,7 +239,7 @@ typedef void
|
|||
* but only if the given key is found in the table.
|
||||
*/
|
||||
typedef void
|
||||
(* CRT_CALL JSDHashClearEntry)(JSDHashTable *table, JSDHashEntryHdr *entry);
|
||||
(* JS_DLL_CALLBACK JSDHashClearEntry)(JSDHashTable *table, JSDHashEntryHdr *entry);
|
||||
|
||||
/*
|
||||
* Called when a table (whether allocated dynamically by itself, or nested in
|
||||
|
@ -255,7 +247,7 @@ typedef void
|
|||
* allows table->ops-specific code to finalize table->data.
|
||||
*/
|
||||
typedef void
|
||||
(* CRT_CALL JSDHashFinalize) (JSDHashTable *table);
|
||||
(* JS_DLL_CALLBACK JSDHashFinalize) (JSDHashTable *table);
|
||||
|
||||
/* Finally, the "vtable" structure for JSDHashTable. */
|
||||
struct JSDHashTableOps {
|
||||
|
@ -432,8 +424,8 @@ JS_DHashTableRawRemove(JSDHashTable *table, JSDHashEntryHdr *entry);
|
|||
* otherwise undefined behavior results.
|
||||
*/
|
||||
typedef JSDHashOperator
|
||||
(* CRT_CALL JSDHashEnumerator)(JSDHashTable *table, JSDHashEntryHdr *hdr,
|
||||
uint32 number, void *arg);
|
||||
(* JS_DLL_CALLBACK JSDHashEnumerator)(JSDHashTable *table, JSDHashEntryHdr *hdr,
|
||||
uint32 number, void *arg);
|
||||
|
||||
extern JS_PUBLIC_API(uint32)
|
||||
JS_DHashTableEnumerate(JSDHashTable *table, JSDHashEnumerator etor, void *arg);
|
||||
|
|
|
@ -96,41 +96,33 @@ typedef enum JSTrapStatus {
|
|||
JSTRAP_LIMIT
|
||||
} JSTrapStatus;
|
||||
|
||||
#ifndef CRT_CALL
|
||||
#ifdef XP_OS2
|
||||
#define CRT_CALL _Optlink
|
||||
#else
|
||||
#define CRT_CALL
|
||||
#endif
|
||||
#endif
|
||||
|
||||
typedef JSTrapStatus
|
||||
(* CRT_CALL JSTrapHandler)(JSContext *cx, JSScript *script, jsbytecode *pc,
|
||||
jsval *rval, void *closure);
|
||||
(* JS_DLL_CALLBACK JSTrapHandler)(JSContext *cx, JSScript *script, jsbytecode *pc,
|
||||
jsval *rval, void *closure);
|
||||
|
||||
typedef JSBool
|
||||
(* CRT_CALL JSWatchPointHandler)(JSContext *cx, JSObject *obj, jsval id,
|
||||
jsval old, jsval *newp, void *closure);
|
||||
(* JS_DLL_CALLBACK JSWatchPointHandler)(JSContext *cx, JSObject *obj, jsval id,
|
||||
jsval old, jsval *newp, void *closure);
|
||||
|
||||
/* called just after script creation */
|
||||
typedef void
|
||||
(* CRT_CALL JSNewScriptHook)(JSContext *cx,
|
||||
const char *filename, /* URL of script */
|
||||
uintN lineno, /* line script starts */
|
||||
JSScript *script,
|
||||
JSFunction *fun,
|
||||
void *callerdata);
|
||||
(* JS_DLL_CALLBACK JSNewScriptHook)(JSContext *cx,
|
||||
const char *filename, /* URL of script */
|
||||
uintN lineno, /* line script starts */
|
||||
JSScript *script,
|
||||
JSFunction *fun,
|
||||
void *callerdata);
|
||||
|
||||
/* called just before script destruction */
|
||||
typedef void
|
||||
(* CRT_CALL JSDestroyScriptHook)(JSContext *cx,
|
||||
JSScript *script,
|
||||
void *callerdata);
|
||||
(* JS_DLL_CALLBACK JSDestroyScriptHook)(JSContext *cx,
|
||||
JSScript *script,
|
||||
void *callerdata);
|
||||
|
||||
typedef void
|
||||
(* CRT_CALL JSSourceHandler)(const char *filename, uintN lineno,
|
||||
jschar *str, size_t length,
|
||||
void **listenerTSData, void *closure);
|
||||
(* JS_DLL_CALLBACK JSSourceHandler)(const char *filename, uintN lineno,
|
||||
jschar *str, size_t length,
|
||||
void **listenerTSData, void *closure);
|
||||
|
||||
/*
|
||||
* This hook captures high level script execution and function calls
|
||||
|
@ -161,15 +153,15 @@ typedef void
|
|||
*/
|
||||
|
||||
typedef void *
|
||||
(* CRT_CALL JSInterpreterHook)(JSContext *cx, JSStackFrame *fp, JSBool before,
|
||||
JSBool *ok, void *closure);
|
||||
(* JS_DLL_CALLBACK JSInterpreterHook)(JSContext *cx, JSStackFrame *fp, JSBool before,
|
||||
JSBool *ok, void *closure);
|
||||
|
||||
typedef void
|
||||
(* CRT_CALL JSObjectHook)(JSContext *cx, JSObject *obj, JSBool isNew,
|
||||
void *closure);
|
||||
(* JS_DLL_CALLBACK JSObjectHook)(JSContext *cx, JSObject *obj, JSBool isNew,
|
||||
void *closure);
|
||||
|
||||
typedef JSBool
|
||||
(* CRT_CALL JSDebugErrorHook)(JSContext *cx, const char *message,
|
||||
JSErrorReport *report, void *closure);
|
||||
(* JS_DLL_CALLBACK JSDebugErrorHook)(JSContext *cx, const char *message,
|
||||
JSErrorReport *report, void *closure);
|
||||
|
||||
#endif /* jsprvtd_h___ */
|
||||
|
|
110
js/src/jspubtd.h
110
js/src/jspubtd.h
|
@ -116,18 +116,10 @@ typedef struct JSXDRState JSXDRState;
|
|||
typedef struct JSExceptionState JSExceptionState;
|
||||
typedef struct JSLocaleCallbacks JSLocaleCallbacks;
|
||||
|
||||
#ifndef CRT_CALL
|
||||
#ifdef XP_OS2_VACPP
|
||||
#define CRT_CALL _Optlink
|
||||
#else
|
||||
#define CRT_CALL
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* JSClass (and JSObjectOps where appropriate) function pointer typedefs. */
|
||||
|
||||
typedef JSBool
|
||||
(* CRT_CALL JSPropertyOp)(JSContext *cx, JSObject *obj, jsval id, jsval *vp);
|
||||
(* JS_DLL_CALLBACK JSPropertyOp)(JSContext *cx, JSObject *obj, jsval id, jsval *vp);
|
||||
|
||||
/*
|
||||
* This function type is used for callbacks that enumerate the properties of
|
||||
|
@ -157,95 +149,95 @@ typedef JSBool
|
|||
* indicating failure.
|
||||
*/
|
||||
typedef JSBool
|
||||
(* CRT_CALL JSNewEnumerateOp)(JSContext *cx, JSObject *obj,
|
||||
JSIterateOp enum_op,
|
||||
jsval *statep, jsid *idp);
|
||||
(* JS_DLL_CALLBACK JSNewEnumerateOp)(JSContext *cx, JSObject *obj,
|
||||
JSIterateOp enum_op,
|
||||
jsval *statep, jsid *idp);
|
||||
|
||||
typedef JSBool
|
||||
(* CRT_CALL JSEnumerateOp)(JSContext *cx, JSObject *obj);
|
||||
(* JS_DLL_CALLBACK JSEnumerateOp)(JSContext *cx, JSObject *obj);
|
||||
|
||||
typedef JSBool
|
||||
(* CRT_CALL JSResolveOp)(JSContext *cx, JSObject *obj, jsval id);
|
||||
(* JS_DLL_CALLBACK JSResolveOp)(JSContext *cx, JSObject *obj, jsval id);
|
||||
|
||||
typedef JSBool
|
||||
(* CRT_CALL JSNewResolveOp)(JSContext *cx, JSObject *obj, jsval id, uintN flags,
|
||||
JSObject **objp);
|
||||
(* JS_DLL_CALLBACK JSNewResolveOp)(JSContext *cx, JSObject *obj, jsval id, uintN flags,
|
||||
JSObject **objp);
|
||||
|
||||
typedef JSBool
|
||||
(* CRT_CALL JSConvertOp)(JSContext *cx, JSObject *obj, JSType type, jsval *vp);
|
||||
(* JS_DLL_CALLBACK JSConvertOp)(JSContext *cx, JSObject *obj, JSType type, jsval *vp);
|
||||
|
||||
typedef void
|
||||
(* CRT_CALL JSFinalizeOp)(JSContext *cx, JSObject *obj);
|
||||
(* JS_DLL_CALLBACK JSFinalizeOp)(JSContext *cx, JSObject *obj);
|
||||
|
||||
typedef void
|
||||
(* CRT_CALL JSStringFinalizeOp)(JSContext *cx, JSString *str);
|
||||
(* JS_DLL_CALLBACK JSStringFinalizeOp)(JSContext *cx, JSString *str);
|
||||
|
||||
typedef JSObjectOps *
|
||||
(* CRT_CALL JSGetObjectOps)(JSContext *cx, JSClass *clasp);
|
||||
(* JS_DLL_CALLBACK JSGetObjectOps)(JSContext *cx, JSClass *clasp);
|
||||
|
||||
typedef JSBool
|
||||
(* CRT_CALL JSCheckAccessOp)(JSContext *cx, JSObject *obj, jsval id,
|
||||
JSAccessMode mode, jsval *vp);
|
||||
(* JS_DLL_CALLBACK JSCheckAccessOp)(JSContext *cx, JSObject *obj, jsval id,
|
||||
JSAccessMode mode, jsval *vp);
|
||||
|
||||
typedef JSBool
|
||||
(* CRT_CALL JSXDRObjectOp)(JSXDRState *xdr, JSObject **objp);
|
||||
(* JS_DLL_CALLBACK JSXDRObjectOp)(JSXDRState *xdr, JSObject **objp);
|
||||
|
||||
typedef JSBool
|
||||
(* CRT_CALL JSHasInstanceOp)(JSContext *cx, JSObject *obj, jsval v,
|
||||
JSBool *bp);
|
||||
(* JS_DLL_CALLBACK JSHasInstanceOp)(JSContext *cx, JSObject *obj, jsval v,
|
||||
JSBool *bp);
|
||||
|
||||
typedef JSBool
|
||||
(* CRT_CALL JSSetObjectSlotOp)(JSContext *cx, JSObject *obj, uint32 slot,
|
||||
JSObject *pobj);
|
||||
(* JS_DLL_CALLBACK JSSetObjectSlotOp)(JSContext *cx, JSObject *obj, uint32 slot,
|
||||
JSObject *pobj);
|
||||
|
||||
typedef uint32
|
||||
(* CRT_CALL JSMarkOp)(JSContext *cx, JSObject *obj, void *arg);
|
||||
(* JS_DLL_CALLBACK JSMarkOp)(JSContext *cx, JSObject *obj, void *arg);
|
||||
|
||||
/* JSObjectOps function pointer typedefs. */
|
||||
|
||||
typedef JSObjectMap *
|
||||
(* CRT_CALL JSNewObjectMapOp)(JSContext *cx, jsrefcount nrefs,
|
||||
JSObjectOps *ops, JSClass *clasp,
|
||||
JSObject *obj);
|
||||
(* JS_DLL_CALLBACK JSNewObjectMapOp)(JSContext *cx, jsrefcount nrefs,
|
||||
JSObjectOps *ops, JSClass *clasp,
|
||||
JSObject *obj);
|
||||
|
||||
typedef void
|
||||
(* CRT_CALL JSObjectMapOp)(JSContext *cx, JSObjectMap *map);
|
||||
(* JS_DLL_CALLBACK JSObjectMapOp)(JSContext *cx, JSObjectMap *map);
|
||||
|
||||
typedef JSBool
|
||||
(* CRT_CALL JSLookupPropOp)(JSContext *cx, JSObject *obj, jsid id,
|
||||
JSObject **objp, JSProperty **propp
|
||||
(* JS_DLL_CALLBACK JSLookupPropOp)(JSContext *cx, JSObject *obj, jsid id,
|
||||
JSObject **objp, JSProperty **propp
|
||||
#if defined JS_THREADSAFE && defined DEBUG
|
||||
, const char *file, uintN line
|
||||
, const char *file, uintN line
|
||||
#endif
|
||||
);
|
||||
);
|
||||
|
||||
typedef JSBool
|
||||
(* CRT_CALL JSDefinePropOp)(JSContext *cx, JSObject *obj, jsid id, jsval value,
|
||||
JSPropertyOp getter, JSPropertyOp setter,
|
||||
uintN attrs, JSProperty **propp);
|
||||
(* JS_DLL_CALLBACK JSDefinePropOp)(JSContext *cx, JSObject *obj, jsid id, jsval value,
|
||||
JSPropertyOp getter, JSPropertyOp setter,
|
||||
uintN attrs, JSProperty **propp);
|
||||
|
||||
typedef JSBool
|
||||
(* CRT_CALL JSPropertyIdOp)(JSContext *cx, JSObject *obj, jsid id, jsval *vp);
|
||||
(* JS_DLL_CALLBACK JSPropertyIdOp)(JSContext *cx, JSObject *obj, jsid id, jsval *vp);
|
||||
|
||||
typedef JSBool
|
||||
(* CRT_CALL JSAttributesOp)(JSContext *cx, JSObject *obj, jsid id,
|
||||
JSProperty *prop, uintN *attrsp);
|
||||
(* JS_DLL_CALLBACK JSAttributesOp)(JSContext *cx, JSObject *obj, jsid id,
|
||||
JSProperty *prop, uintN *attrsp);
|
||||
|
||||
typedef JSBool
|
||||
(* CRT_CALL JSCheckAccessIdOp)(JSContext *cx, JSObject *obj, jsid id,
|
||||
JSAccessMode mode, jsval *vp, uintN *attrsp);
|
||||
(* JS_DLL_CALLBACK JSCheckAccessIdOp)(JSContext *cx, JSObject *obj, jsid id,
|
||||
JSAccessMode mode, jsval *vp, uintN *attrsp);
|
||||
|
||||
typedef JSObject *
|
||||
(* CRT_CALL JSObjectOp)(JSContext *cx, JSObject *obj);
|
||||
(* JS_DLL_CALLBACK JSObjectOp)(JSContext *cx, JSObject *obj);
|
||||
|
||||
typedef void
|
||||
(* CRT_CALL JSPropertyRefOp)(JSContext *cx, JSObject *obj, JSProperty *prop);
|
||||
(* JS_DLL_CALLBACK JSPropertyRefOp)(JSContext *cx, JSObject *obj, JSProperty *prop);
|
||||
|
||||
/* Typedef for native functions called by the JS VM. */
|
||||
|
||||
typedef JSBool
|
||||
(* CRT_CALL JSNative)(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
|
||||
jsval *rval);
|
||||
(* JS_DLL_CALLBACK JSNative)(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
|
||||
jsval *rval);
|
||||
|
||||
/* Callbacks and their arguments. */
|
||||
|
||||
|
@ -256,14 +248,14 @@ typedef enum JSGCStatus {
|
|||
} JSGCStatus;
|
||||
|
||||
typedef JSBool
|
||||
(* CRT_CALL JSGCCallback)(JSContext *cx, JSGCStatus status);
|
||||
(* JS_DLL_CALLBACK JSGCCallback)(JSContext *cx, JSGCStatus status);
|
||||
|
||||
typedef JSBool
|
||||
(* CRT_CALL JSBranchCallback)(JSContext *cx, JSScript *script);
|
||||
(* JS_DLL_CALLBACK JSBranchCallback)(JSContext *cx, JSScript *script);
|
||||
|
||||
typedef void
|
||||
(* CRT_CALL JSErrorReporter)(JSContext *cx, const char *message,
|
||||
JSErrorReport *report);
|
||||
(* JS_DLL_CALLBACK JSErrorReporter)(JSContext *cx, const char *message,
|
||||
JSErrorReport *report);
|
||||
|
||||
typedef struct JSErrorFormatString {
|
||||
const char *format;
|
||||
|
@ -271,25 +263,25 @@ typedef struct JSErrorFormatString {
|
|||
} JSErrorFormatString;
|
||||
|
||||
typedef const JSErrorFormatString *
|
||||
(* CRT_CALL JSErrorCallback)(void *userRef, const char *locale,
|
||||
const uintN errorNumber);
|
||||
(* JS_DLL_CALLBACK JSErrorCallback)(void *userRef, const char *locale,
|
||||
const uintN errorNumber);
|
||||
|
||||
#ifdef va_start
|
||||
#define JS_ARGUMENT_FORMATTER_DEFINED 1
|
||||
|
||||
typedef JSBool
|
||||
(* CRT_CALL JSArgumentFormatter)(JSContext *cx, const char *format,
|
||||
JSBool fromJS, jsval **vpp, va_list *app);
|
||||
(* JS_DLL_CALLBACK JSArgumentFormatter)(JSContext *cx, const char *format,
|
||||
JSBool fromJS, jsval **vpp, va_list *app);
|
||||
#endif
|
||||
|
||||
typedef JSBool
|
||||
(* CRT_CALL JSLocaleToUpperCase)(JSContext *cx, JSString *src, jsval *rval);
|
||||
(* JS_DLL_CALLBACK JSLocaleToUpperCase)(JSContext *cx, JSString *src, jsval *rval);
|
||||
|
||||
typedef JSBool
|
||||
(* CRT_CALL JSLocaleToLowerCase)(JSContext *cx, JSString *src, jsval *rval);
|
||||
(* JS_DLL_CALLBACK JSLocaleToLowerCase)(JSContext *cx, JSString *src, jsval *rval);
|
||||
|
||||
typedef JSBool
|
||||
(* CRT_CALL JSLocaleCompare)(JSContext *cx, JSString *src1, JSString *src2, jsval *rval);
|
||||
(* JS_DLL_CALLBACK JSLocaleCompare)(JSContext *cx, JSString *src1, JSString *src2, jsval *rval);
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -23,4 +23,6 @@ s/\([^U]\)int16/\1PRInt16/g
|
|||
s/JSBool/PRBool/g
|
||||
s/extern JS_PUBLIC_API/PR_EXTERN/
|
||||
s/JS_PUBLIC_API/PR_IMPLEMENT/
|
||||
s/JS_DLL_CALLBACK/PR_CALLBACK/
|
||||
s/JS_STATIC_DLL_CALLBACK/PR_STATIC_CALLBACK/
|
||||
s/JS_/PR_/g
|
||||
|
|
|
@ -248,12 +248,12 @@ protected:
|
|||
|
||||
// all instantiated headers, but doesn't hold refs.
|
||||
PLDHashTable *m_headersInUse;
|
||||
static const void* CRT_CALL GetKey(PLDHashTable* aTable, PLDHashEntryHdr* aEntry);
|
||||
static PLDHashNumber CRT_CALL HashKey(PLDHashTable* aTable, const void* aKey);
|
||||
static PRBool CRT_CALL MatchEntry(PLDHashTable* aTable, const PLDHashEntryHdr* aEntry, const void* aKey);
|
||||
static void CRT_CALL MoveEntry(PLDHashTable* aTable, const PLDHashEntryHdr* aFrom, PLDHashEntryHdr* aTo);
|
||||
static void CRT_CALL ClearEntry(PLDHashTable* aTable, PLDHashEntryHdr* aEntry);
|
||||
static PLDHashOperator CRT_CALL HeaderEnumerator (PLDHashTable *table, PLDHashEntryHdr *hdr,
|
||||
static const void* PR_CALLBACK GetKey(PLDHashTable* aTable, PLDHashEntryHdr* aEntry);
|
||||
static PLDHashNumber PR_CALLBACK HashKey(PLDHashTable* aTable, const void* aKey);
|
||||
static PRBool PR_CALLBACK MatchEntry(PLDHashTable* aTable, const PLDHashEntryHdr* aEntry, const void* aKey);
|
||||
static void PR_CALLBACK MoveEntry(PLDHashTable* aTable, const PLDHashEntryHdr* aFrom, PLDHashEntryHdr* aTo);
|
||||
static void PR_CALLBACK ClearEntry(PLDHashTable* aTable, PLDHashEntryHdr* aEntry);
|
||||
static PLDHashOperator PR_CALLBACK HeaderEnumerator (PLDHashTable *table, PLDHashEntryHdr *hdr,
|
||||
PRUint32 number, void *arg);
|
||||
static PLDHashTableOps gMsgDBHashTableOps;
|
||||
struct MsgHdrHashElement {
|
||||
|
|
|
@ -129,7 +129,7 @@ nsresult nsMsgDatabase::AddHdrToCache(nsIMsgDBHdr *hdr, nsMsgKey key) // do we w
|
|||
}
|
||||
|
||||
|
||||
/* static */PLDHashOperator CRT_CALL nsMsgDatabase::HeaderEnumerator (PLDHashTable *table, PLDHashEntryHdr *hdr,
|
||||
/* static */PLDHashOperator PR_CALLBACK nsMsgDatabase::HeaderEnumerator (PLDHashTable *table, PLDHashEntryHdr *hdr,
|
||||
PRUint32 number, void *arg)
|
||||
{
|
||||
|
||||
|
@ -220,7 +220,7 @@ PLDHashTableOps nsMsgDatabase::gMsgDBHashTableOps =
|
|||
PL_DHashFinalizeStub
|
||||
};
|
||||
|
||||
const void* CRT_CALL
|
||||
const void* PR_CALLBACK
|
||||
nsMsgDatabase::GetKey(PLDHashTable* aTable, PLDHashEntryHdr* aEntry)
|
||||
{
|
||||
MsgHdrHashElement* hdr = NS_REINTERPRET_CAST(MsgHdrHashElement*, aEntry);
|
||||
|
@ -232,20 +232,20 @@ nsMsgDatabase::GetKey(PLDHashTable* aTable, PLDHashEntryHdr* aEntry)
|
|||
|
||||
// HashKey is supposed to maximize entropy in the low order bits, and the key
|
||||
// as is, should do that.
|
||||
PLDHashNumber CRT_CALL
|
||||
PLDHashNumber PR_CALLBACK
|
||||
nsMsgDatabase::HashKey(PLDHashTable* aTable, const void* aKey)
|
||||
{
|
||||
return PLDHashNumber(aKey);
|
||||
}
|
||||
|
||||
PRBool CRT_CALL
|
||||
PRBool PR_CALLBACK
|
||||
nsMsgDatabase::MatchEntry(PLDHashTable* aTable, const PLDHashEntryHdr* aEntry, const void* aKey)
|
||||
{
|
||||
const MsgHdrHashElement* hdr = NS_REINTERPRET_CAST(const MsgHdrHashElement*, aEntry);
|
||||
return aKey == (const void *) hdr->mKey; // ### or get the key from the hdr...
|
||||
}
|
||||
|
||||
void CRT_CALL
|
||||
void PR_CALLBACK
|
||||
nsMsgDatabase::MoveEntry(PLDHashTable* aTable, const PLDHashEntryHdr* aFrom, PLDHashEntryHdr* aTo)
|
||||
{
|
||||
const MsgHdrHashElement* from = NS_REINTERPRET_CAST(const MsgHdrHashElement*, aFrom);
|
||||
|
@ -254,7 +254,7 @@ nsMsgDatabase::MoveEntry(PLDHashTable* aTable, const PLDHashEntryHdr* aFrom, PLD
|
|||
*to = *from;
|
||||
}
|
||||
|
||||
void CRT_CALL
|
||||
void PR_CALLBACK
|
||||
nsMsgDatabase::ClearEntry(PLDHashTable* aTable, PLDHashEntryHdr* aEntry)
|
||||
{
|
||||
MsgHdrHashElement* element = NS_REINTERPRET_CAST(MsgHdrHashElement*, aEntry);
|
||||
|
@ -262,10 +262,10 @@ nsMsgDatabase::ClearEntry(PLDHashTable* aTable, PLDHashEntryHdr* aEntry)
|
|||
element->mKey = nsMsgKey_None; // eh?
|
||||
}
|
||||
|
||||
extern PLDHashNumber CRT_CALL
|
||||
extern PLDHashNumber PR_CALLBACK
|
||||
PL_DHashStringKey(PLDHashTable *table, const void *key);
|
||||
|
||||
extern void CRT_CALL
|
||||
extern void PR_CALLBACK
|
||||
PL_DHashFinalizeStub(PLDHashTable *table);
|
||||
|
||||
|
||||
|
|
|
@ -503,7 +503,7 @@ nsCacheEntryHashTable::VisitEntries( nsCacheEntryHashTable::Visitor *visitor)
|
|||
}
|
||||
|
||||
|
||||
PLDHashOperator CRT_CALL
|
||||
PLDHashOperator PR_CALLBACK
|
||||
nsCacheEntryHashTable::VisitEntry(PLDHashTable *table,
|
||||
PLDHashEntryHdr *hashEntry,
|
||||
PRUint32 number,
|
||||
|
@ -517,7 +517,7 @@ nsCacheEntryHashTable::VisitEntry(PLDHashTable *table,
|
|||
/**
|
||||
* hash table operation callback functions
|
||||
*/
|
||||
const void * CRT_CALL
|
||||
const void * PR_CALLBACK
|
||||
nsCacheEntryHashTable::GetKey( PLDHashTable * /*table*/, PLDHashEntryHdr *hashEntry)
|
||||
{
|
||||
nsCacheEntry *cacheEntry = ((nsCacheEntryHashTableEntry *)hashEntry)->cacheEntry;
|
||||
|
@ -525,13 +525,13 @@ nsCacheEntryHashTable::GetKey( PLDHashTable * /*table*/, PLDHashEntryHdr *hashEn
|
|||
}
|
||||
|
||||
|
||||
PLDHashNumber CRT_CALL
|
||||
PLDHashNumber PR_CALLBACK
|
||||
nsCacheEntryHashTable::HashKey( PLDHashTable *table, const void *key)
|
||||
{
|
||||
return PL_DHashStringKey(table,((nsCString *)key)->get());
|
||||
}
|
||||
|
||||
PRBool CRT_CALL
|
||||
PRBool PR_CALLBACK
|
||||
nsCacheEntryHashTable::MatchEntry(PLDHashTable * /* table */,
|
||||
const PLDHashEntryHdr * hashEntry,
|
||||
const void * key)
|
||||
|
@ -543,7 +543,7 @@ nsCacheEntryHashTable::MatchEntry(PLDHashTable * /* table */,
|
|||
}
|
||||
|
||||
|
||||
void CRT_CALL
|
||||
void PR_CALLBACK
|
||||
nsCacheEntryHashTable::MoveEntry(PLDHashTable * /* table */,
|
||||
const PLDHashEntryHdr *from,
|
||||
PLDHashEntryHdr *to)
|
||||
|
@ -554,7 +554,7 @@ nsCacheEntryHashTable::MoveEntry(PLDHashTable * /* table */,
|
|||
}
|
||||
|
||||
|
||||
void CRT_CALL
|
||||
void PR_CALLBACK
|
||||
nsCacheEntryHashTable::ClearEntry(PLDHashTable * /* table */,
|
||||
PLDHashEntryHdr * hashEntry)
|
||||
{
|
||||
|
@ -570,7 +570,7 @@ nsCacheEntryHashTable::Finalize(PLDHashTable * table)
|
|||
}
|
||||
|
||||
|
||||
PLDHashOperator CRT_CALL
|
||||
PLDHashOperator PR_CALLBACK
|
||||
nsCacheEntryHashTable::FreeCacheEntries(PLDHashTable *table,
|
||||
PLDHashEntryHdr *hdr,
|
||||
PRUint32 number,
|
||||
|
|
|
@ -267,32 +267,32 @@ private:
|
|||
friend class nsCacheService; // XXX redefine interface so this isn't necessary
|
||||
|
||||
// PLDHashTable operation callbacks
|
||||
static const void * CRT_CALL GetKey( PLDHashTable *table, PLDHashEntryHdr *entry);
|
||||
static const void * PR_CALLBACK GetKey( PLDHashTable *table, PLDHashEntryHdr *entry);
|
||||
|
||||
static PLDHashNumber CRT_CALL HashKey( PLDHashTable *table, const void *key);
|
||||
static PLDHashNumber PR_CALLBACK HashKey( PLDHashTable *table, const void *key);
|
||||
|
||||
static PRBool CRT_CALL MatchEntry( PLDHashTable * table,
|
||||
const PLDHashEntryHdr * entry,
|
||||
const void * key);
|
||||
static PRBool PR_CALLBACK MatchEntry( PLDHashTable * table,
|
||||
const PLDHashEntryHdr * entry,
|
||||
const void * key);
|
||||
|
||||
static void CRT_CALL MoveEntry( PLDHashTable *table,
|
||||
const PLDHashEntryHdr *from,
|
||||
PLDHashEntryHdr *to);
|
||||
static void PR_CALLBACK MoveEntry( PLDHashTable *table,
|
||||
const PLDHashEntryHdr *from,
|
||||
PLDHashEntryHdr *to);
|
||||
|
||||
static void CRT_CALL ClearEntry( PLDHashTable *table, PLDHashEntryHdr *entry);
|
||||
static void PR_CALLBACK ClearEntry( PLDHashTable *table, PLDHashEntryHdr *entry);
|
||||
|
||||
static void CRT_CALL Finalize( PLDHashTable *table);
|
||||
static void PR_CALLBACK Finalize( PLDHashTable *table);
|
||||
|
||||
static
|
||||
PLDHashOperator CRT_CALL FreeCacheEntries(PLDHashTable * table,
|
||||
PLDHashEntryHdr * hdr,
|
||||
PRUint32 number,
|
||||
void * arg);
|
||||
PLDHashOperator PR_CALLBACK FreeCacheEntries(PLDHashTable * table,
|
||||
PLDHashEntryHdr * hdr,
|
||||
PRUint32 number,
|
||||
void * arg);
|
||||
static
|
||||
PLDHashOperator CRT_CALL VisitEntry(PLDHashTable * table,
|
||||
PLDHashEntryHdr * hdr,
|
||||
PRUint32 number,
|
||||
void * arg);
|
||||
PLDHashOperator PR_CALLBACK VisitEntry(PLDHashTable * table,
|
||||
PLDHashEntryHdr * hdr,
|
||||
PRUint32 number,
|
||||
void * arg);
|
||||
|
||||
// member variables
|
||||
static PLDHashTableOps ops;
|
||||
|
|
|
@ -197,14 +197,14 @@ nsCacheMetaData::UnflattenMetaData(char * data, PRUint32 size)
|
|||
* hash table operation callback functions
|
||||
*/
|
||||
|
||||
const void * CRT_CALL
|
||||
const void * PR_CALLBACK
|
||||
nsCacheMetaData::GetKey( PLDHashTable * /* table */, PLDHashEntryHdr *hashEntry)
|
||||
{
|
||||
return ((nsCacheMetaDataHashTableEntry *)hashEntry)->key;
|
||||
}
|
||||
|
||||
|
||||
PLDHashNumber CRT_CALL
|
||||
PLDHashNumber PR_CALLBACK
|
||||
nsCacheMetaData::HashKey( PLDHashTable * table, const void *key)
|
||||
{
|
||||
// XXX need scc's new flat string abstract class here (bug 70075)
|
||||
|
@ -212,7 +212,7 @@ nsCacheMetaData::HashKey( PLDHashTable * table, const void *key)
|
|||
}
|
||||
|
||||
|
||||
PRBool CRT_CALL
|
||||
PRBool PR_CALLBACK
|
||||
nsCacheMetaData::MatchEntry(PLDHashTable * /* table */,
|
||||
const PLDHashEntryHdr * hashEntry,
|
||||
const void * key)
|
||||
|
@ -225,7 +225,7 @@ nsCacheMetaData::MatchEntry(PLDHashTable * /* table */,
|
|||
}
|
||||
|
||||
|
||||
void CRT_CALL
|
||||
void PR_CALLBACK
|
||||
nsCacheMetaData::MoveEntry(PLDHashTable * /* table */,
|
||||
const PLDHashEntryHdr *from,
|
||||
PLDHashEntryHdr *to)
|
||||
|
@ -238,7 +238,7 @@ nsCacheMetaData::MoveEntry(PLDHashTable * /* table */,
|
|||
}
|
||||
|
||||
|
||||
void CRT_CALL
|
||||
void PR_CALLBACK
|
||||
nsCacheMetaData::ClearEntry(PLDHashTable * /* table */,
|
||||
PLDHashEntryHdr * hashEntry)
|
||||
{
|
||||
|
@ -248,7 +248,7 @@ nsCacheMetaData::ClearEntry(PLDHashTable * /* table */,
|
|||
}
|
||||
|
||||
|
||||
void CRT_CALL
|
||||
void PR_CALLBACK
|
||||
nsCacheMetaData::Finalize(PLDHashTable * table)
|
||||
{
|
||||
(void) PL_DHashTableEnumerate(table, FreeElements, nsnull);
|
||||
|
@ -259,7 +259,7 @@ nsCacheMetaData::Finalize(PLDHashTable * table)
|
|||
* hash table enumeration callback functions
|
||||
*/
|
||||
|
||||
PLDHashOperator CRT_CALL
|
||||
PLDHashOperator PR_CALLBACK
|
||||
nsCacheMetaData::CalculateSize(PLDHashTable *table,
|
||||
PLDHashEntryHdr *hdr,
|
||||
PRUint32 number,
|
||||
|
@ -270,7 +270,7 @@ nsCacheMetaData::CalculateSize(PLDHashTable *table,
|
|||
return PL_DHASH_NEXT;
|
||||
}
|
||||
|
||||
PLDHashOperator CRT_CALL
|
||||
PLDHashOperator PR_CALLBACK
|
||||
nsCacheMetaData::AccumulateElements(PLDHashTable *table,
|
||||
PLDHashEntryHdr *hdr,
|
||||
PRUint32 number,
|
||||
|
@ -287,7 +287,7 @@ nsCacheMetaData::AccumulateElements(PLDHashTable *table,
|
|||
return PL_DHASH_NEXT;
|
||||
}
|
||||
|
||||
PLDHashOperator CRT_CALL
|
||||
PLDHashOperator PR_CALLBACK
|
||||
nsCacheMetaData::FreeElements(PLDHashTable *table,
|
||||
PLDHashEntryHdr *hdr,
|
||||
PRUint32 number,
|
||||
|
|
|
@ -67,39 +67,39 @@ public:
|
|||
|
||||
private:
|
||||
// PLDHashTable operation callbacks
|
||||
static const void * CRT_CALL GetKey( PLDHashTable *table, PLDHashEntryHdr *entry);
|
||||
static const void * PR_CALLBACK GetKey( PLDHashTable *table, PLDHashEntryHdr *entry);
|
||||
|
||||
static PLDHashNumber CRT_CALL HashKey( PLDHashTable *table, const void *key);
|
||||
static PLDHashNumber PR_CALLBACK HashKey( PLDHashTable *table, const void *key);
|
||||
|
||||
static PRBool CRT_CALL MatchEntry( PLDHashTable * table,
|
||||
const PLDHashEntryHdr * entry,
|
||||
const void * key);
|
||||
static PRBool PR_CALLBACK MatchEntry( PLDHashTable * table,
|
||||
const PLDHashEntryHdr * entry,
|
||||
const void * key);
|
||||
|
||||
static void CRT_CALL MoveEntry( PLDHashTable *table,
|
||||
const PLDHashEntryHdr *from,
|
||||
PLDHashEntryHdr *to);
|
||||
static void PR_CALLBACK MoveEntry( PLDHashTable *table,
|
||||
const PLDHashEntryHdr *from,
|
||||
PLDHashEntryHdr *to);
|
||||
|
||||
static void CRT_CALL ClearEntry( PLDHashTable *table, PLDHashEntryHdr *entry);
|
||||
static void PR_CALLBACK ClearEntry( PLDHashTable *table, PLDHashEntryHdr *entry);
|
||||
|
||||
static void CRT_CALL Finalize( PLDHashTable *table);
|
||||
static void PR_CALLBACK Finalize( PLDHashTable *table);
|
||||
|
||||
static
|
||||
PLDHashOperator CRT_CALL CalculateSize(PLDHashTable *table,
|
||||
PLDHashEntryHdr *hdr,
|
||||
PRUint32 number,
|
||||
void *arg);
|
||||
PLDHashOperator PR_CALLBACK CalculateSize(PLDHashTable *table,
|
||||
PLDHashEntryHdr *hdr,
|
||||
PRUint32 number,
|
||||
void *arg);
|
||||
|
||||
static
|
||||
PLDHashOperator CRT_CALL AccumulateElements(PLDHashTable *table,
|
||||
PLDHashEntryHdr *hdr,
|
||||
PRUint32 number,
|
||||
void *arg);
|
||||
PLDHashOperator PR_CALLBACK AccumulateElements(PLDHashTable *table,
|
||||
PLDHashEntryHdr *hdr,
|
||||
PRUint32 number,
|
||||
void *arg);
|
||||
|
||||
static
|
||||
PLDHashOperator CRT_CALL FreeElements(PLDHashTable *table,
|
||||
PLDHashEntryHdr *hdr,
|
||||
PRUint32 number,
|
||||
void *arg);
|
||||
PLDHashOperator PR_CALLBACK FreeElements(PLDHashTable *table,
|
||||
PLDHashEntryHdr *hdr,
|
||||
PRUint32 number,
|
||||
void *arg);
|
||||
|
||||
// member variables
|
||||
static PLDHashTableOps ops;
|
||||
|
|
|
@ -812,7 +812,7 @@ nsCacheService::ClearActiveEntries()
|
|||
}
|
||||
|
||||
|
||||
PLDHashOperator CRT_CALL
|
||||
PLDHashOperator PR_CALLBACK
|
||||
nsCacheService::DeactivateAndClearEntry(PLDHashTable * table,
|
||||
PLDHashEntryHdr * hdr,
|
||||
PRUint32 number,
|
||||
|
|
|
@ -137,10 +137,10 @@ private:
|
|||
void ClearActiveEntries(void);
|
||||
|
||||
static
|
||||
PLDHashOperator CRT_CALL DeactivateAndClearEntry(PLDHashTable * table,
|
||||
PLDHashEntryHdr * hdr,
|
||||
PRUint32 number,
|
||||
void * arg);
|
||||
PLDHashOperator PR_CALLBACK DeactivateAndClearEntry(PLDHashTable * table,
|
||||
PLDHashEntryHdr * hdr,
|
||||
PRUint32 number,
|
||||
void * arg);
|
||||
|
||||
/**
|
||||
* Data Members
|
||||
|
|
|
@ -122,7 +122,7 @@ nsDiskCacheEntryHashTable::VisitEntries(Visitor *visitor)
|
|||
}
|
||||
|
||||
|
||||
PLDHashOperator CRT_CALL
|
||||
PLDHashOperator PR_CALLBACK
|
||||
nsDiskCacheEntryHashTable::VisitEntry(PLDHashTable * table,
|
||||
PLDHashEntryHdr * header,
|
||||
PRUint32 number,
|
||||
|
@ -136,7 +136,7 @@ nsDiskCacheEntryHashTable::VisitEntry(PLDHashTable * table,
|
|||
/**
|
||||
* hash table operation callback functions
|
||||
*/
|
||||
const void * CRT_CALL
|
||||
const void * PR_CALLBACK
|
||||
nsDiskCacheEntryHashTable::GetKey(PLDHashTable * /*table*/, PLDHashEntryHdr * header)
|
||||
{
|
||||
HashTableEntry * hashEntry = (HashTableEntry *) header;
|
||||
|
@ -144,13 +144,13 @@ nsDiskCacheEntryHashTable::GetKey(PLDHashTable * /*table*/, PLDHashEntryHdr * he
|
|||
}
|
||||
|
||||
|
||||
PLDHashNumber CRT_CALL
|
||||
PLDHashNumber PR_CALLBACK
|
||||
nsDiskCacheEntryHashTable::HashKey( PLDHashTable *table, const void *key)
|
||||
{
|
||||
return (PLDHashNumber) key;
|
||||
}
|
||||
|
||||
PRBool CRT_CALL
|
||||
PRBool PR_CALLBACK
|
||||
nsDiskCacheEntryHashTable::MatchEntry(PLDHashTable * /* table */,
|
||||
const PLDHashEntryHdr * header,
|
||||
const void * key)
|
||||
|
@ -159,7 +159,7 @@ nsDiskCacheEntryHashTable::MatchEntry(PLDHashTable * /* table */,
|
|||
return (hashEntry->mDiskCacheEntry->getHashNumber() == (PLDHashNumber) key);
|
||||
}
|
||||
|
||||
void CRT_CALL
|
||||
void PR_CALLBACK
|
||||
nsDiskCacheEntryHashTable::MoveEntry(PLDHashTable * /* table */,
|
||||
const PLDHashEntryHdr * fromHeader,
|
||||
PLDHashEntryHdr * toHeader)
|
||||
|
@ -172,7 +172,7 @@ nsDiskCacheEntryHashTable::MoveEntry(PLDHashTable * /* table */,
|
|||
}
|
||||
|
||||
|
||||
void CRT_CALL
|
||||
void PR_CALLBACK
|
||||
nsDiskCacheEntryHashTable::ClearEntry(PLDHashTable * /* table */,
|
||||
PLDHashEntryHdr * header)
|
||||
{
|
||||
|
@ -182,14 +182,14 @@ nsDiskCacheEntryHashTable::ClearEntry(PLDHashTable * /* table */,
|
|||
}
|
||||
|
||||
|
||||
void CRT_CALL
|
||||
void PR_CALLBACK
|
||||
nsDiskCacheEntryHashTable::Finalize(PLDHashTable * table)
|
||||
{
|
||||
(void) PL_DHashTableEnumerate(table, FreeCacheEntries, nsnull);
|
||||
}
|
||||
|
||||
|
||||
PLDHashOperator CRT_CALL
|
||||
PLDHashOperator PR_CALLBACK
|
||||
nsDiskCacheEntryHashTable::FreeCacheEntries(PLDHashTable * /* table */,
|
||||
PLDHashEntryHdr * header,
|
||||
PRUint32 number,
|
||||
|
|
|
@ -124,35 +124,35 @@ private:
|
|||
};
|
||||
|
||||
// PLDHashTable operation callbacks
|
||||
static const void * CRT_CALL GetKey(PLDHashTable * table,
|
||||
PLDHashEntryHdr * entry);
|
||||
static const void * PR_CALLBACK GetKey(PLDHashTable * table,
|
||||
PLDHashEntryHdr * entry);
|
||||
|
||||
static PLDHashNumber CRT_CALL HashKey(PLDHashTable * table,
|
||||
const void * key);
|
||||
static PLDHashNumber PR_CALLBACK HashKey(PLDHashTable * table,
|
||||
const void * key);
|
||||
|
||||
static PRBool CRT_CALL MatchEntry(PLDHashTable * table,
|
||||
const PLDHashEntryHdr * entry,
|
||||
const void * key);
|
||||
static PRBool PR_CALLBACK MatchEntry(PLDHashTable * table,
|
||||
const PLDHashEntryHdr * entry,
|
||||
const void * key);
|
||||
|
||||
static void CRT_CALL MoveEntry(PLDHashTable * table,
|
||||
const PLDHashEntryHdr * from,
|
||||
PLDHashEntryHdr * to);
|
||||
static void PR_CALLBACK MoveEntry(PLDHashTable * table,
|
||||
const PLDHashEntryHdr * from,
|
||||
PLDHashEntryHdr * to);
|
||||
|
||||
static void CRT_CALL ClearEntry(PLDHashTable * table,
|
||||
PLDHashEntryHdr * entry);
|
||||
static void PR_CALLBACK ClearEntry(PLDHashTable * table,
|
||||
PLDHashEntryHdr * entry);
|
||||
|
||||
static void CRT_CALL Finalize(PLDHashTable *table);
|
||||
static void PR_CALLBACK Finalize(PLDHashTable *table);
|
||||
|
||||
static
|
||||
PLDHashOperator CRT_CALL FreeCacheEntries(PLDHashTable * table,
|
||||
PLDHashEntryHdr * hdr,
|
||||
PRUint32 number,
|
||||
void * arg);
|
||||
PLDHashOperator PR_CALLBACK FreeCacheEntries(PLDHashTable * table,
|
||||
PLDHashEntryHdr * hdr,
|
||||
PRUint32 number,
|
||||
void * arg);
|
||||
static
|
||||
PLDHashOperator CRT_CALL VisitEntry(PLDHashTable * table,
|
||||
PLDHashEntryHdr * hdr,
|
||||
PRUint32 number,
|
||||
void * arg);
|
||||
PLDHashOperator PR_CALLBACK VisitEntry(PLDHashTable * table,
|
||||
PLDHashEntryHdr * hdr,
|
||||
PRUint32 number,
|
||||
void * arg);
|
||||
|
||||
// member variables
|
||||
static PLDHashTableOps ops;
|
||||
|
|
|
@ -187,24 +187,16 @@ struct PLDHashTable {
|
|||
#endif
|
||||
};
|
||||
|
||||
#ifndef CRT_CALL
|
||||
#ifdef XP_OS2_VACPP
|
||||
#define CRT_CALL _Optlink
|
||||
#else
|
||||
#define CRT_CALL
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Table space at entryStore is allocated and freed using these callbacks.
|
||||
* The allocator should return null on error only (not if called with nbytes
|
||||
* equal to 0; but note that jsdhash.c code will never call with 0 nbytes).
|
||||
*/
|
||||
typedef void *
|
||||
(* CRT_CALL PLDHashAllocTable)(PLDHashTable *table, PRUint32 nbytes);
|
||||
(* PR_CALLBACK PLDHashAllocTable)(PLDHashTable *table, PRUint32 nbytes);
|
||||
|
||||
typedef void
|
||||
(* CRT_CALL PLDHashFreeTable) (PLDHashTable *table, void *ptr);
|
||||
(* PR_CALLBACK PLDHashFreeTable) (PLDHashTable *table, void *ptr);
|
||||
|
||||
/*
|
||||
* When a table grows or shrinks, each entry is queried for its key using this
|
||||
|
@ -213,23 +205,23 @@ typedef void
|
|||
* moved via moveEntry callbacks.
|
||||
*/
|
||||
typedef const void *
|
||||
(* CRT_CALL PLDHashGetKey) (PLDHashTable *table, PLDHashEntryHdr *entry);
|
||||
(* PR_CALLBACK PLDHashGetKey) (PLDHashTable *table, PLDHashEntryHdr *entry);
|
||||
|
||||
/*
|
||||
* Compute the hash code for a given key to be looked up, added, or removed
|
||||
* from table. A hash code may have any PLDHashNumber value.
|
||||
*/
|
||||
typedef PLDHashNumber
|
||||
(* CRT_CALL PLDHashHashKey) (PLDHashTable *table, const void *key);
|
||||
(* PR_CALLBACK PLDHashHashKey) (PLDHashTable *table, const void *key);
|
||||
|
||||
/*
|
||||
* Compare the key identifying entry in table with the provided key parameter.
|
||||
* Return PR_TRUE if keys match, PR_FALSE otherwise.
|
||||
*/
|
||||
typedef PRBool
|
||||
(* CRT_CALL PLDHashMatchEntry)(PLDHashTable *table,
|
||||
const PLDHashEntryHdr *entry,
|
||||
const void *key);
|
||||
(* PR_CALLBACK PLDHashMatchEntry)(PLDHashTable *table,
|
||||
const PLDHashEntryHdr *entry,
|
||||
const void *key);
|
||||
|
||||
/*
|
||||
* Copy the data starting at from to the new entry storage at to. Do not add
|
||||
|
@ -238,9 +230,9 @@ typedef PRBool
|
|||
* any reference-decrementing callback shortly.
|
||||
*/
|
||||
typedef void
|
||||
(* CRT_CALL PLDHashMoveEntry)(PLDHashTable *table,
|
||||
const PLDHashEntryHdr *from,
|
||||
PLDHashEntryHdr *to);
|
||||
(* PR_CALLBACK PLDHashMoveEntry)(PLDHashTable *table,
|
||||
const PLDHashEntryHdr *from,
|
||||
PLDHashEntryHdr *to);
|
||||
|
||||
/*
|
||||
* Clear the entry and drop any strong references it holds. This callback is
|
||||
|
@ -248,7 +240,7 @@ typedef void
|
|||
* but only if the given key is found in the table.
|
||||
*/
|
||||
typedef void
|
||||
(* CRT_CALL PLDHashClearEntry)(PLDHashTable *table, PLDHashEntryHdr *entry);
|
||||
(* PR_CALLBACK PLDHashClearEntry)(PLDHashTable *table, PLDHashEntryHdr *entry);
|
||||
|
||||
/*
|
||||
* Called when a table (whether allocated dynamically by itself, or nested in
|
||||
|
@ -256,7 +248,7 @@ typedef void
|
|||
* allows table->ops-specific code to finalize table->data.
|
||||
*/
|
||||
typedef void
|
||||
(* CRT_CALL PLDHashFinalize) (PLDHashTable *table);
|
||||
(* PR_CALLBACK PLDHashFinalize) (PLDHashTable *table);
|
||||
|
||||
/* Finally, the "vtable" structure for PLDHashTable. */
|
||||
struct PLDHashTableOps {
|
||||
|
@ -433,8 +425,8 @@ PL_DHashTableRawRemove(PLDHashTable *table, PLDHashEntryHdr *entry);
|
|||
* otherwise undefined behavior results.
|
||||
*/
|
||||
typedef PLDHashOperator
|
||||
(* CRT_CALL PLDHashEnumerator)(PLDHashTable *table, PLDHashEntryHdr *hdr,
|
||||
PRUint32 number, void *arg);
|
||||
(* PR_CALLBACK PLDHashEnumerator)(PLDHashTable *table, PLDHashEntryHdr *hdr,
|
||||
PRUint32 number, void *arg);
|
||||
|
||||
PR_EXTERN(PRUint32)
|
||||
PL_DHashTableEnumerate(PLDHashTable *table, PLDHashEnumerator etor, void *arg);
|
||||
|
|
Загрузка…
Ссылка в новой задаче