Constipation of (JS|PL)DHashTableOps (195298, r/sr=shaver/alecf).

This commit is contained in:
brendan%mozilla.org 2003-02-28 07:17:59 +00:00
Родитель a8a1c05479
Коммит 1e352e85b2
6 изменённых файлов: 18 добавлений и 18 удалений

Просмотреть файл

@ -123,7 +123,7 @@ JS_DHashFinalizeStub(JSDHashTable *table)
{
}
static JSDHashTableOps stub_ops = {
const static JSDHashTableOps stub_ops = {
JS_DHashAllocTable,
JS_DHashFreeTable,
JS_DHashGetKeyStub,
@ -135,14 +135,14 @@ static JSDHashTableOps stub_ops = {
NULL
};
JS_PUBLIC_API(JSDHashTableOps *)
JS_PUBLIC_API(const JSDHashTableOps *)
JS_DHashGetStubOps(void)
{
return &stub_ops;
}
JS_PUBLIC_API(JSDHashTable *)
JS_NewDHashTable(JSDHashTableOps *ops, void *data, uint32 entrySize,
JS_NewDHashTable(const JSDHashTableOps *ops, void *data, uint32 entrySize,
uint32 capacity)
{
JSDHashTable *table;
@ -165,7 +165,7 @@ JS_DHashTableDestroy(JSDHashTable *table)
}
JS_PUBLIC_API(JSBool)
JS_DHashTableInit(JSDHashTable *table, JSDHashTableOps *ops, void *data,
JS_DHashTableInit(JSDHashTable *table, const JSDHashTableOps *ops, void *data,
uint32 entrySize, uint32 capacity)
{
int log2;

Просмотреть файл

@ -183,7 +183,7 @@ struct JSDHashEntryHdr {
* required, double hashing wins.
*/
struct JSDHashTable {
JSDHashTableOps *ops; /* virtual operations, see below */
const JSDHashTableOps *ops; /* virtual operations, see below */
void *data; /* ops- and instance-specific data */
int16 hashShift; /* multiplicative hash shift */
uint8 maxAlphaFrac; /* 8-bit fixed point max alpha */
@ -386,7 +386,7 @@ JS_DHashFinalizeStub(JSDHashTable *table);
* if your entries move via memcpy and clear via memset(0), you can use these
* stub operations.
*/
extern JS_PUBLIC_API(JSDHashTableOps *)
extern JS_PUBLIC_API(const JSDHashTableOps *)
JS_DHashGetStubOps(void);
/*
@ -396,7 +396,7 @@ JS_DHashGetStubOps(void);
* the ops->allocTable callback.
*/
extern JS_PUBLIC_API(JSDHashTable *)
JS_NewDHashTable(JSDHashTableOps *ops, void *data, uint32 entrySize,
JS_NewDHashTable(const JSDHashTableOps *ops, void *data, uint32 entrySize,
uint32 capacity);
/*
@ -413,7 +413,7 @@ JS_DHashTableDestroy(JSDHashTable *table);
* only to avoid inevitable early growth from JS_DHASH_MIN_SIZE).
*/
extern JS_PUBLIC_API(JSBool)
JS_DHashTableInit(JSDHashTable *table, JSDHashTableOps *ops, void *data,
JS_DHashTableInit(JSDHashTable *table, const JSDHashTableOps *ops, void *data,
uint32 entrySize, uint32 capacity);
/*

Просмотреть файл

@ -2156,7 +2156,7 @@ resolving_MatchEntry(JSDHashTable *table,
return entry->key.obj == key->obj && entry->key.id == key->id;
}
static JSDHashTableOps resolving_dhash_ops = {
static const JSDHashTableOps resolving_dhash_ops = {
JS_DHashAllocTable,
JS_DHashFreeTable,
resolving_GetKey,

Просмотреть файл

@ -430,7 +430,7 @@ js_MatchScopeProperty(JSDHashTable *table,
return SPROP_MATCH(sprop, kprop);
}
static JSDHashTableOps PropertyTreeHashOps = {
static const JSDHashTableOps PropertyTreeHashOps = {
JS_DHashAllocTable,
JS_DHashFreeTable,
JS_DHashGetKeyStub,

Просмотреть файл

@ -124,7 +124,7 @@ PL_DHashFinalizeStub(PLDHashTable *table)
{
}
static PLDHashTableOps stub_ops = {
const static PLDHashTableOps stub_ops = {
PL_DHashAllocTable,
PL_DHashFreeTable,
PL_DHashGetKeyStub,
@ -136,14 +136,14 @@ static PLDHashTableOps stub_ops = {
NULL
};
PR_IMPLEMENT(PLDHashTableOps *)
PR_IMPLEMENT(const PLDHashTableOps *)
PL_DHashGetStubOps(void)
{
return &stub_ops;
}
PR_IMPLEMENT(PLDHashTable *)
PL_NewDHashTable(PLDHashTableOps *ops, void *data, PRUint32 entrySize,
PL_NewDHashTable(const PLDHashTableOps *ops, void *data, PRUint32 entrySize,
PRUint32 capacity)
{
PLDHashTable *table;
@ -166,7 +166,7 @@ PL_DHashTableDestroy(PLDHashTable *table)
}
PR_IMPLEMENT(PRBool)
PL_DHashTableInit(PLDHashTable *table, PLDHashTableOps *ops, void *data,
PL_DHashTableInit(PLDHashTable *table, const PLDHashTableOps *ops, void *data,
PRUint32 entrySize, PRUint32 capacity)
{
int log2;

Просмотреть файл

@ -184,7 +184,7 @@ struct PLDHashEntryHdr {
* required, double hashing wins.
*/
struct PLDHashTable {
PLDHashTableOps *ops; /* virtual operations, see below */
const PLDHashTableOps *ops; /* virtual operations, see below */
void *data; /* ops- and instance-specific data */
PRInt16 hashShift; /* multiplicative hash shift */
uint8 maxAlphaFrac; /* 8-bit fixed point max alpha */
@ -387,7 +387,7 @@ PL_DHashFinalizeStub(PLDHashTable *table);
* if your entries move via memcpy and clear via memset(0), you can use these
* stub operations.
*/
PR_EXTERN(PLDHashTableOps *)
PR_EXTERN(const PLDHashTableOps *)
PL_DHashGetStubOps(void);
/*
@ -397,7 +397,7 @@ PL_DHashGetStubOps(void);
* the ops->allocTable callback.
*/
PR_EXTERN(PLDHashTable *)
PL_NewDHashTable(PLDHashTableOps *ops, void *data, PRUint32 entrySize,
PL_NewDHashTable(const PLDHashTableOps *ops, void *data, PRUint32 entrySize,
PRUint32 capacity);
/*
@ -414,7 +414,7 @@ PL_DHashTableDestroy(PLDHashTable *table);
* only to avoid inevitable early growth from PL_DHASH_MIN_SIZE).
*/
PR_EXTERN(PRBool)
PL_DHashTableInit(PLDHashTable *table, PLDHashTableOps *ops, void *data,
PL_DHashTableInit(PLDHashTable *table, const PLDHashTableOps *ops, void *data,
PRUint32 entrySize, PRUint32 capacity);
/*