Back to index

lightning-sunbird  0.9+nobinonly
Functions
nsTHashtable.cpp File Reference
#include "nsTHashtable.h"
#include "nsHashKeys.h"

Go to the source code of this file.

Functions

PRUint32 HashString (const nsAString &aStr)
PRUint32 HashString (const nsACString &aStr)
PRUint32 HashCString (const char *str)
 PL_DHashStubEnumRemove (PLDHashTable *table, PLDHashEntryHdr *entry, PRUint32 ordinal, void *userarg)

Function Documentation

PRUint32 HashCString ( const char *  str)

Definition at line 88 of file nsTHashtable.cpp.

{
  PRUint32 code = 0;

  while (*str) {
    code = (code>>28) ^ (code<<4) ^ PRUint32(*str);
    ++str;
  }

  return code;
}

Here is the caller graph for this function:

PRUint32 HashString ( const nsAString &  aStr)

Definition at line 42 of file nsTHashtable.cpp.

{
  PRUint32 code = 0;

#ifdef MOZILLA_INTERNAL_API
  nsAString::const_iterator begin, end;
  aStr.BeginReading(begin);
  aStr.EndReading(end);
#else
  const PRUnichar *begin, *end;
  PRUint32 len = NS_StringGetData(aStr, &begin);
  end = begin + len;
#endif

  while (begin != end) {
    code = (code>>28) ^ (code<<4) ^ PRUint32(*begin);
    ++begin;
  }

  return code;
}

Here is the call graph for this function:

Here is the caller graph for this function:

PRUint32 HashString ( const nsACString &  aStr)

Definition at line 65 of file nsTHashtable.cpp.

{
  PRUint32 code = 0;

#ifdef MOZILLA_INTERNAL_API
  nsACString::const_iterator begin, end;
  aStr.BeginReading(begin);
  aStr.EndReading(end);
#else
  const char *begin, *end;
  PRUint32 len = NS_CStringGetData(aStr, &begin);
  end = begin + len;
#endif

  while (begin != end) {
    code = (code>>28) ^ (code<<4) ^ PRUint32(*begin);
    ++begin;
  }

  return code;
}

Here is the call graph for this function:

PL_DHashStubEnumRemove ( PLDHashTable table,
PLDHashEntryHdr entry,
PRUint32  ordinal,
void userarg 
)

Definition at line 101 of file nsTHashtable.cpp.

{
  return PL_DHASH_REMOVE;
}

Here is the caller graph for this function: