Back to index

lightning-sunbird  0.9+nobinonly
Functions
nsElementMap.cpp File Reference
#include "nsCOMPtr.h"
#include "nsCRT.h"
#include "nsElementMap.h"
#include "nsISupportsArray.h"
#include "nsString.h"
#include "nsIAtom.h"
#include "nsReadableUtils.h"
#include "prlog.h"

Go to the source code of this file.

Functions

static void *PR_CALLBACK AllocTable (void *aPool, PRSize aSize)
static void PR_CALLBACK FreeTable (void *aPool, void *aItem)
static PLHashEntry *PR_CALLBACK AllocEntry (void *aPool, const void *aKey)
static void PR_CALLBACK FreeEntry (void *aPool, PLHashEntry *aEntry, PRUintn aFlag)

Function Documentation

static PLHashEntry* PR_CALLBACK AllocEntry ( void aPool,
const void aKey 
) [static]

Definition at line 73 of file nsElementMap.cpp.

{
    nsFixedSizeAllocator* pool = NS_STATIC_CAST(nsFixedSizeAllocator*, aPool);
    PLHashEntry* entry = NS_STATIC_CAST(PLHashEntry*, pool->Alloc(sizeof(PLHashEntry)));
    return entry;
}
static void* PR_CALLBACK AllocTable ( void aPool,
PRSize  aSize 
) [static]

Definition at line 63 of file nsElementMap.cpp.

{
    return new char[aSize];
}
static void PR_CALLBACK FreeEntry ( void aPool,
PLHashEntry aEntry,
PRUintn  aFlag 
) [static]

Definition at line 80 of file nsElementMap.cpp.

{
    nsFixedSizeAllocator* pool = NS_STATIC_CAST(nsFixedSizeAllocator*, aPool);
    if (aFlag == HT_FREE_ENTRY)
        pool->Free(aEntry, sizeof(PLHashEntry));
}
static void PR_CALLBACK FreeTable ( void aPool,
void aItem 
) [static]

Definition at line 68 of file nsElementMap.cpp.

{
    delete[] NS_STATIC_CAST(char*, aItem);
}