Fix a macro name (LIMIT, not MAX -- fencepost, not maximum value; r=lumpy, sr=jack).

This commit is contained in:
brendan%mozilla.org 2002-08-07 20:22:38 +00:00
Родитель 25b06b0922
Коммит bfcad6929a
4 изменённых файлов: 10 добавлений и 10 удалений

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

@ -188,7 +188,7 @@ JS_DHashTableInit(JSDHashTable *table, JSDHashTableOps *ops, void *data,
capacity = JS_DHASH_MIN_SIZE;
log2 = JS_CeilingLog2(capacity);
capacity = JS_BIT(log2);
if (capacity >= JS_DHASH_MAX_SIZE)
if (capacity >= JS_DHASH_SIZE_LIMIT)
return JS_FALSE;
table->hashShift = JS_DHASH_BITS - log2;
table->maxAlphaFrac = 0xC0; /* 12/16 or .75 */
@ -428,7 +428,7 @@ ChangeTable(JSDHashTable *table, int deltaLog2)
newLog2 = oldLog2 + deltaLog2;
oldCapacity = JS_BIT(oldLog2);
newCapacity = JS_BIT(newLog2);
if (newCapacity >= JS_DHASH_MAX_SIZE)
if (newCapacity >= JS_DHASH_SIZE_LIMIT)
return JS_FALSE;
entrySize = table->entrySize;
nbytes = newCapacity * entrySize;

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

@ -49,9 +49,9 @@ JS_BEGIN_EXTERN_C
#define JS_DHASHMETER 1
#endif
/* Maximum table size, do not equal or exceed (see min&maxAlphaFrac, below). */
#undef JS_DHASH_MAX_SIZE
#define JS_DHASH_MAX_SIZE JS_BIT(24)
/* Table size limit, do not equal or exceed (see min&maxAlphaFrac, below). */
#undef JS_DHASH_SIZE_LIMIT
#define JS_DHASH_SIZE_LIMIT JS_BIT(24)
/* Minimum table size, or gross entry count (net is at most .75 loaded). */
#ifndef JS_DHASH_MIN_SIZE

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

@ -189,7 +189,7 @@ PL_DHashTableInit(PLDHashTable *table, PLDHashTableOps *ops, void *data,
capacity = PL_DHASH_MIN_SIZE;
log2 = PR_CeilingLog2(capacity);
capacity = PR_BIT(log2);
if (capacity >= PL_DHASH_MAX_SIZE)
if (capacity >= PL_DHASH_SIZE_LIMIT)
return PR_FALSE;
table->hashShift = PL_DHASH_BITS - log2;
table->maxAlphaFrac = 0xC0; /* 12/16 or .75 */
@ -429,7 +429,7 @@ ChangeTable(PLDHashTable *table, int deltaLog2)
newLog2 = oldLog2 + deltaLog2;
oldCapacity = PR_BIT(oldLog2);
newCapacity = PR_BIT(newLog2);
if (newCapacity >= PL_DHASH_MAX_SIZE)
if (newCapacity >= PL_DHASH_SIZE_LIMIT)
return PR_FALSE;
entrySize = table->entrySize;
nbytes = newCapacity * entrySize;

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

@ -50,9 +50,9 @@ PR_BEGIN_EXTERN_C
#define PL_DHASHMETER 1
#endif
/* Maximum table size, do not equal or exceed (see min&maxAlphaFrac, below). */
#undef PL_DHASH_MAX_SIZE
#define PL_DHASH_MAX_SIZE PR_BIT(24)
/* Table size limit, do not equal or exceed (see min&maxAlphaFrac, below). */
#undef PL_DHASH_SIZE_LIMIT
#define PL_DHASH_SIZE_LIMIT PR_BIT(24)
/* Minimum table size, or gross entry count (net is at most .75 loaded). */
#ifndef PL_DHASH_MIN_SIZE