зеркало из https://github.com/mozilla/pjs.git
changed HashCode to HashValue and fixed return type
This commit is contained in:
Родитель
9a7ee7e36d
Коммит
95ae58e4db
|
@ -103,7 +103,7 @@ AtomImpl::SizeOf(nsISizeOfHandler* aHandler) const
|
|||
|
||||
static PLHashNumber HashKey(const PRUnichar* k)
|
||||
{
|
||||
return (PLHashNumber) nsCRT::HashCode(k);
|
||||
return (PLHashNumber) nsCRT::HashValue(k);
|
||||
}
|
||||
|
||||
static PRIntn CompareKeys(const PRUnichar* k1, const PRUnichar* k2)
|
||||
|
@ -131,7 +131,7 @@ NS_BASE nsIAtom* NS_NewAtom(const PRUnichar* us)
|
|||
nsnull, nsnull);
|
||||
}
|
||||
PRInt32 uslen;
|
||||
PRInt32 hashCode = nsCRT::HashCode(us, &uslen);
|
||||
PRUint32 hashCode = nsCRT::HashValue(us, &uslen);
|
||||
PLHashEntry** hep = PL_HashTableRawLookup(gAtomHashTable, hashCode, us);
|
||||
PLHashEntry* he = *hep;
|
||||
if (nsnull != he) {
|
||||
|
|
|
@ -366,9 +366,9 @@ PRInt32 nsCRT::strncasecmp(const PRUnichar* s1, const char* s2, PRInt32 n)
|
|||
return 0;
|
||||
}
|
||||
|
||||
PRInt32 nsCRT::HashCode(const PRUnichar* us)
|
||||
PRUint32 nsCRT::HashValue(const PRUnichar* us)
|
||||
{
|
||||
PRInt32 rv = 0;
|
||||
PRUint32 rv = 0;
|
||||
if(us) {
|
||||
PRUnichar ch;
|
||||
while ((ch = *us++) != 0) {
|
||||
|
@ -379,9 +379,9 @@ PRInt32 nsCRT::HashCode(const PRUnichar* us)
|
|||
return rv;
|
||||
}
|
||||
|
||||
PRInt32 nsCRT::HashCode(const PRUnichar* us, PRInt32* uslenp)
|
||||
PRUint32 nsCRT::HashValue(const PRUnichar* us, PRInt32* uslenp)
|
||||
{
|
||||
PRInt32 rv = 0;
|
||||
PRUint32 rv = 0;
|
||||
PRInt32 len = 0;
|
||||
PRUnichar ch;
|
||||
while ((ch = *us++) != 0) {
|
||||
|
|
|
@ -99,10 +99,10 @@ public:
|
|||
PRInt32 aMaxLen);
|
||||
|
||||
/// Compute a hashcode for a ucs2 string
|
||||
static PRInt32 HashCode(const PRUnichar* s1);
|
||||
static PRUint32 HashValue(const PRUnichar* s1);
|
||||
|
||||
/// Same as above except that we return the length in s1len
|
||||
static PRInt32 HashCode(const PRUnichar* s1, PRInt32* s1len);
|
||||
static PRUint32 HashValue(const PRUnichar* s1, PRInt32* s1len);
|
||||
|
||||
/// String to integer.
|
||||
static PRInt32 atoi( const PRUnichar *string );
|
||||
|
|
|
@ -103,7 +103,7 @@ AtomImpl::SizeOf(nsISizeOfHandler* aHandler) const
|
|||
|
||||
static PLHashNumber HashKey(const PRUnichar* k)
|
||||
{
|
||||
return (PLHashNumber) nsCRT::HashCode(k);
|
||||
return (PLHashNumber) nsCRT::HashValue(k);
|
||||
}
|
||||
|
||||
static PRIntn CompareKeys(const PRUnichar* k1, const PRUnichar* k2)
|
||||
|
@ -131,7 +131,7 @@ NS_BASE nsIAtom* NS_NewAtom(const PRUnichar* us)
|
|||
nsnull, nsnull);
|
||||
}
|
||||
PRInt32 uslen;
|
||||
PRInt32 hashCode = nsCRT::HashCode(us, &uslen);
|
||||
PRUint32 hashCode = nsCRT::HashValue(us, &uslen);
|
||||
PLHashEntry** hep = PL_HashTableRawLookup(gAtomHashTable, hashCode, us);
|
||||
PLHashEntry* he = *hep;
|
||||
if (nsnull != he) {
|
||||
|
|
|
@ -366,9 +366,9 @@ PRInt32 nsCRT::strncasecmp(const PRUnichar* s1, const char* s2, PRInt32 n)
|
|||
return 0;
|
||||
}
|
||||
|
||||
PRInt32 nsCRT::HashCode(const PRUnichar* us)
|
||||
PRUint32 nsCRT::HashValue(const PRUnichar* us)
|
||||
{
|
||||
PRInt32 rv = 0;
|
||||
PRUint32 rv = 0;
|
||||
if(us) {
|
||||
PRUnichar ch;
|
||||
while ((ch = *us++) != 0) {
|
||||
|
@ -379,9 +379,9 @@ PRInt32 nsCRT::HashCode(const PRUnichar* us)
|
|||
return rv;
|
||||
}
|
||||
|
||||
PRInt32 nsCRT::HashCode(const PRUnichar* us, PRInt32* uslenp)
|
||||
PRUint32 nsCRT::HashValue(const PRUnichar* us, PRInt32* uslenp)
|
||||
{
|
||||
PRInt32 rv = 0;
|
||||
PRUint32 rv = 0;
|
||||
PRInt32 len = 0;
|
||||
PRUnichar ch;
|
||||
while ((ch = *us++) != 0) {
|
||||
|
|
|
@ -99,10 +99,10 @@ public:
|
|||
PRInt32 aMaxLen);
|
||||
|
||||
/// Compute a hashcode for a ucs2 string
|
||||
static PRInt32 HashCode(const PRUnichar* s1);
|
||||
static PRUint32 HashValue(const PRUnichar* s1);
|
||||
|
||||
/// Same as above except that we return the length in s1len
|
||||
static PRInt32 HashCode(const PRUnichar* s1, PRInt32* s1len);
|
||||
static PRUint32 HashValue(const PRUnichar* s1, PRInt32* s1len);
|
||||
|
||||
/// String to integer.
|
||||
static PRInt32 atoi( const PRUnichar *string );
|
||||
|
|
Загрузка…
Ссылка в новой задаче