Bug 1121304 (part 1) - Minor type clean-ups for PLDHashTable. r=froydnj.

This commit is contained in:
Nicholas Nethercote 2015-01-14 14:35:45 -08:00
parent c4c1173204
commit 08af04376d
3 changed files with 8 additions and 9 deletions

View File

@ -42,7 +42,7 @@ struct HttpHeapAtom {
char value[1]; char value[1];
}; };
static struct PLDHashTable sAtomTable; static PLDHashTable sAtomTable;
static struct HttpHeapAtom *sHeapAtoms = nullptr; static struct HttpHeapAtom *sHeapAtoms = nullptr;
static Mutex *sLock = nullptr; static Mutex *sLock = nullptr;

View File

@ -33,7 +33,7 @@ protected:
nsCOMPtr<nsIUnicharInputStream> mIn; nsCOMPtr<nsIUnicharInputStream> mIn;
nsIPersistentProperties* mSubclass; nsIPersistentProperties* mSubclass;
struct PLDHashTable mTable; PLDHashTable mTable;
PLArenaPool mArena; PLArenaPool mArena;
}; };

View File

@ -53,12 +53,10 @@
#define PL_DHASH_BITS 32 #define PL_DHASH_BITS 32
#define PL_DHASH_GOLDEN_RATIO 0x9E3779B9U #define PL_DHASH_GOLDEN_RATIO 0x9E3779B9U
/* Primitive and forward-struct typedefs. */ typedef uint32_t PLDHashNumber;
typedef uint32_t PLDHashNumber;
typedef struct PLDHashEntryHdr PLDHashEntryHdr; class PLDHashTable;
typedef struct PLDHashEntryStub PLDHashEntryStub; struct PLDHashTableOps;
typedef struct PLDHashTable PLDHashTable;
typedef struct PLDHashTableOps PLDHashTableOps;
/* /*
* Table entry header structure. * Table entry header structure.
@ -176,8 +174,9 @@ typedef size_t (*PLDHashSizeOfEntryExcludingThisFun)(
* aTable->mGeneration before adding or removing, and compare the sample after, * aTable->mGeneration before adding or removing, and compare the sample after,
* dereferencing the entry pointer only if aTable->mGeneration has not changed. * dereferencing the entry pointer only if aTable->mGeneration has not changed.
*/ */
struct PLDHashTable class PLDHashTable
{ {
public:
/* /*
* Virtual operations; see below. This field is public because it's commonly * Virtual operations; see below. This field is public because it's commonly
* zeroed to indicate that a table is no longer live. * zeroed to indicate that a table is no longer live.