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 47221bc7f9
commit 41dc319a7c
3 changed files with 8 additions and 9 deletions

View File

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

View File

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

View File

@ -53,12 +53,10 @@
#define PL_DHASH_BITS 32
#define PL_DHASH_GOLDEN_RATIO 0x9E3779B9U
/* Primitive and forward-struct typedefs. */
typedef uint32_t PLDHashNumber;
typedef struct PLDHashEntryHdr PLDHashEntryHdr;
typedef struct PLDHashEntryStub PLDHashEntryStub;
typedef struct PLDHashTable PLDHashTable;
typedef struct PLDHashTableOps PLDHashTableOps;
typedef uint32_t PLDHashNumber;
class PLDHashTable;
struct PLDHashTableOps;
/*
* Table entry header structure.
@ -176,8 +174,9 @@ typedef size_t (*PLDHashSizeOfEntryExcludingThisFun)(
* aTable->mGeneration before adding or removing, and compare the sample after,
* 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
* zeroed to indicate that a table is no longer live.