Reorder static and const to match tradition; reomve DEBUG_brendan cruft.

This commit is contained in:
brendan%mozilla.org 2003-03-08 01:28:02 +00:00
parent 84551c90d5
commit ae0c4d3804
2 changed files with 2 additions and 22 deletions

View File

@ -123,7 +123,7 @@ JS_DHashFinalizeStub(JSDHashTable *table)
{
}
const static JSDHashTableOps stub_ops = {
static const JSDHashTableOps stub_ops = {
JS_DHashAllocTable,
JS_DHashFreeTable,
JS_DHashGetKeyStub,
@ -379,16 +379,6 @@ SearchTable(JSDHashTable *table, const void *key, JSDHashNumber keyHash,
entry = ADDRESS_ENTRY(table, hash1);
if (JS_DHASH_ENTRY_IS_FREE(entry)) {
#ifdef DEBUG_brendan
extern char *getenv(const char *);
static JSBool gotFirstRemovedEnvar = JS_FALSE;
static char *doFirstRemoved = NULL;
if (!gotFirstRemovedEnvar) {
doFirstRemoved = getenv("DHASH_DO_FIRST_REMOVED");
gotFirstRemovedEnvar = JS_TRUE;
}
if (!doFirstRemoved) return entry;
#endif
METER(table->stats.misses++);
return (firstRemoved && op == JS_DHASH_ADD) ? firstRemoved : entry;
}

View File

@ -124,7 +124,7 @@ PL_DHashFinalizeStub(PLDHashTable *table)
{
}
const static PLDHashTableOps stub_ops = {
static const PLDHashTableOps stub_ops = {
PL_DHashAllocTable,
PL_DHashFreeTable,
PL_DHashGetKeyStub,
@ -380,16 +380,6 @@ SearchTable(PLDHashTable *table, const void *key, PLDHashNumber keyHash,
entry = ADDRESS_ENTRY(table, hash1);
if (PL_DHASH_ENTRY_IS_FREE(entry)) {
#ifdef DEBUG_brendan
extern char *getenv(const char *);
static PRBool gotFirstRemovedEnvar = PR_FALSE;
static char *doFirstRemoved = NULL;
if (!gotFirstRemovedEnvar) {
doFirstRemoved = getenv("DHASH_DO_FIRST_REMOVED");
gotFirstRemovedEnvar = PR_TRUE;
}
if (!doFirstRemoved) return entry;
#endif
METER(table->stats.misses++);
return (firstRemoved && op == PL_DHASH_ADD) ? firstRemoved : entry;
}