fix for bug 195298 - pldhash ops tables should be const.. r=dougt, sr=sfraser
git-svn-id: svn://10.0.0.236/trunk@140696 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -203,12 +203,12 @@ TypesToLogFreeEntry(void *pool, PLHashEntry *he, PRUintn flag)
|
||||
}
|
||||
}
|
||||
|
||||
static PLHashAllocOps serialNumberHashAllocOps = {
|
||||
static const PLHashAllocOps serialNumberHashAllocOps = {
|
||||
DefaultAllocTable, DefaultFreeTable,
|
||||
DefaultAllocEntry, SerialNumberFreeEntry
|
||||
};
|
||||
|
||||
static PLHashAllocOps typesToLogHashAllocOps = {
|
||||
static const PLHashAllocOps typesToLogHashAllocOps = {
|
||||
DefaultAllocTable, DefaultFreeTable,
|
||||
DefaultAllocEntry, TypesToLogFreeEntry
|
||||
};
|
||||
@@ -430,7 +430,7 @@ BloatViewFreeEntry(void *pool, PLHashEntry *he, PRUintn flag)
|
||||
}
|
||||
}
|
||||
|
||||
static PLHashAllocOps bloatViewHashAllocOps = {
|
||||
const static PLHashAllocOps bloatViewHashAllocOps = {
|
||||
DefaultAllocTable, DefaultFreeTable,
|
||||
DefaultAllocEntry, BloatViewFreeEntry
|
||||
};
|
||||
|
||||
@@ -203,12 +203,12 @@ TypesToLogFreeEntry(void *pool, PLHashEntry *he, PRUintn flag)
|
||||
}
|
||||
}
|
||||
|
||||
static PLHashAllocOps serialNumberHashAllocOps = {
|
||||
static const PLHashAllocOps serialNumberHashAllocOps = {
|
||||
DefaultAllocTable, DefaultFreeTable,
|
||||
DefaultAllocEntry, SerialNumberFreeEntry
|
||||
};
|
||||
|
||||
static PLHashAllocOps typesToLogHashAllocOps = {
|
||||
static const PLHashAllocOps typesToLogHashAllocOps = {
|
||||
DefaultAllocTable, DefaultFreeTable,
|
||||
DefaultAllocEntry, TypesToLogFreeEntry
|
||||
};
|
||||
@@ -430,7 +430,7 @@ BloatViewFreeEntry(void *pool, PLHashEntry *he, PRUintn flag)
|
||||
}
|
||||
}
|
||||
|
||||
static PLHashAllocOps bloatViewHashAllocOps = {
|
||||
const static PLHashAllocOps bloatViewHashAllocOps = {
|
||||
DefaultAllocTable, DefaultFreeTable,
|
||||
DefaultAllocEntry, BloatViewFreeEntry
|
||||
};
|
||||
|
||||
@@ -127,7 +127,7 @@ static const char gIDFormat[] =
|
||||
|
||||
// Nonexistent factory entry
|
||||
// This is used to mark non-existent contractid mappings
|
||||
static nsFactoryEntry * kNonExistentContractID = (nsFactoryEntry*) 1;
|
||||
static const nsFactoryEntry * const kNonExistentContractID = (nsFactoryEntry*) 1;
|
||||
|
||||
|
||||
#define NS_EMPTY_IID \
|
||||
@@ -303,7 +303,7 @@ factory_ClearEntry(PLDHashTable *aTable, PLDHashEntryHdr *aHdr)
|
||||
PL_DHashClearEntryStub(aTable, aHdr);
|
||||
}
|
||||
|
||||
static PLDHashTableOps factory_DHashTableOps = {
|
||||
static const PLDHashTableOps factory_DHashTableOps = {
|
||||
PL_DHashAllocTable,
|
||||
PL_DHashFreeTable,
|
||||
factory_GetKey,
|
||||
@@ -352,7 +352,7 @@ contractID_ClearEntry(PLDHashTable *aTable, PLDHashEntryHdr *aHdr)
|
||||
PL_DHashClearEntryStub(aTable, aHdr);
|
||||
}
|
||||
|
||||
static PLDHashTableOps contractID_DHashTableOps = {
|
||||
static const PLDHashTableOps contractID_DHashTableOps = {
|
||||
PL_DHashAllocTable,
|
||||
PL_DHashFreeTable,
|
||||
contractID_GetKey,
|
||||
|
||||
@@ -209,7 +209,7 @@ AtomTableClearEntry(PLDHashTable *table, PLDHashEntryHdr *entry)
|
||||
he->ClearAtom();
|
||||
}
|
||||
|
||||
static PLDHashTableOps AtomTableOps = {
|
||||
static const PLDHashTableOps AtomTableOps = {
|
||||
PL_DHashAllocTable,
|
||||
PL_DHashFreeTable,
|
||||
AtomTableGetKey,
|
||||
|
||||
@@ -84,7 +84,7 @@ clearHashEntry(PLDHashTable* table, PLDHashEntryHdr* entry)
|
||||
}
|
||||
|
||||
|
||||
static PLDHashTableOps hashtableOps = {
|
||||
static const PLDHashTableOps hashtableOps = {
|
||||
PL_DHashAllocTable,
|
||||
PL_DHashFreeTable,
|
||||
PL_DHashGetKeyStub,
|
||||
|
||||
@@ -105,7 +105,7 @@ getPropertyKey(PLDHashTable*, PLDHashEntryHdr* aHdr)
|
||||
return entry->mKey;
|
||||
}
|
||||
|
||||
struct PLDHashTableOps property_HashTableOps = {
|
||||
static const struct PLDHashTableOps property_HashTableOps = {
|
||||
PL_DHashAllocTable,
|
||||
PL_DHashFreeTable,
|
||||
getPropertyKey,
|
||||
|
||||
@@ -89,7 +89,7 @@ getNameKey(PLDHashTable*, PLDHashEntryHdr* aHdr)
|
||||
return entry->mKey;
|
||||
}
|
||||
|
||||
struct PLDHashTableOps nametable_CaseInsensitiveHashTableOps = {
|
||||
static const struct PLDHashTableOps nametable_CaseInsensitiveHashTableOps = {
|
||||
PL_DHashAllocTable,
|
||||
PL_DHashFreeTable,
|
||||
getNameKey,
|
||||
|
||||
@@ -345,7 +345,7 @@ strmap_ClearEntry(PLDHashTable *aTable, PLDHashEntryHdr *aHdr)
|
||||
PL_DHashClearEntryStub(aTable, aHdr);
|
||||
}
|
||||
|
||||
static PLDHashTableOps strmap_DHashTableOps = {
|
||||
static const PLDHashTableOps strmap_DHashTableOps = {
|
||||
PL_DHashAllocTable,
|
||||
PL_DHashFreeTable,
|
||||
PL_DHashGetKeyStub,
|
||||
@@ -381,7 +381,7 @@ objmap_ClearEntry(PLDHashTable *aTable, PLDHashEntryHdr *aHdr)
|
||||
PL_DHashClearEntryStub(aTable, aHdr);
|
||||
}
|
||||
|
||||
static PLDHashTableOps objmap_DHashTableOps = {
|
||||
static const PLDHashTableOps objmap_DHashTableOps = {
|
||||
PL_DHashAllocTable,
|
||||
PL_DHashFreeTable,
|
||||
PL_DHashGetKeyStub,
|
||||
@@ -1212,7 +1212,7 @@ idmap_MatchEntry(PLDHashTable *aTable,
|
||||
return memcmp(&entry->mSlowID, idp, sizeof(nsID)) == 0;
|
||||
}
|
||||
|
||||
static PLDHashTableOps idmap_DHashTableOps = {
|
||||
static const PLDHashTableOps idmap_DHashTableOps = {
|
||||
PL_DHashAllocTable,
|
||||
PL_DHashFreeTable,
|
||||
idmap_GetKey,
|
||||
|
||||
@@ -71,7 +71,7 @@ IIDMatch(PLDHashTable *table,
|
||||
return iid1 == iid2 || iid1->Equals(*iid2);
|
||||
}
|
||||
|
||||
static struct PLDHashTableOps IIDTableOps =
|
||||
const static struct PLDHashTableOps IIDTableOps =
|
||||
{
|
||||
PL_DHashAllocTable,
|
||||
PL_DHashFreeTable,
|
||||
@@ -101,7 +101,7 @@ NameMatch(PLDHashTable *table,
|
||||
return str1 == str2 || 0 == PL_strcmp(str1, str2);
|
||||
}
|
||||
|
||||
static struct PLDHashTableOps NameTableOps =
|
||||
static const struct PLDHashTableOps NameTableOps =
|
||||
{
|
||||
PL_DHashAllocTable,
|
||||
PL_DHashFreeTable,
|
||||
|
||||
@@ -50,7 +50,7 @@ static PRUintn LockStackTPI = (PRUintn)-1;
|
||||
static PLHashTable* OrderTable = 0;
|
||||
static PRLock* OrderTableLock = 0;
|
||||
|
||||
static const char* LockTypeNames[] = {"Lock", "Monitor", "CMonitor"};
|
||||
static const char* const LockTypeNames[] = {"Lock", "Monitor", "CMonitor"};
|
||||
|
||||
struct nsNamedVector : public nsVoidArray {
|
||||
const char* mName;
|
||||
@@ -110,7 +110,7 @@ _hash_free_entry(void *pool, PLHashEntry *entry, PRUintn flag)
|
||||
delete entry;
|
||||
}
|
||||
|
||||
static PLHashAllocOps _hash_alloc_ops = {
|
||||
static const PLHashAllocOps _hash_alloc_ops = {
|
||||
_hash_alloc_table, _hash_free_table,
|
||||
_hash_alloc_entry, _hash_free_entry
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user