Back to index

lightning-sunbird  0.9+nobinonly
Static Public Member Functions | Public Attributes
BlobHashEntry Struct Reference
Inheritance diagram for BlobHashEntry:
Inheritance graph
Collaboration diagram for BlobHashEntry:
Collaboration graph

List of all members.

Static Public Member Functions

static const void *PR_CALLBACK GetKey (PLDHashTable *table, PLDHashEntryHdr *hdr)
static PLDHashNumber PR_CALLBACK HashKey (PLDHashTable *table, const void *key)
static PRBool PR_CALLBACK MatchEntry (PLDHashTable *table, const PLDHashEntryHdr *hdr, const void *key)

Public Attributes

PLDHashNumber keyHash

Detailed Description

Definition at line 479 of file nsRDFService.cpp.

Member Function Documentation

static const void* PR_CALLBACK BlobHashEntry::GetKey ( PLDHashTable table,
PLDHashEntryHdr hdr 
) [inline, static]

Definition at line 483 of file nsRDFService.cpp.

        BlobHashEntry *entry = NS_STATIC_CAST(BlobHashEntry *, hdr);
        return &entry->mBlob->mData;
static PLDHashNumber PR_CALLBACK BlobHashEntry::HashKey ( PLDHashTable table,
const void key 
) [inline, static]

Definition at line 490 of file nsRDFService.cpp.

        const BlobImpl::Data *data =
            NS_STATIC_CAST(const BlobImpl::Data *, key);

        const PRUint8 *p = data->mBytes, *limit = p + data->mLength;
        PLDHashNumber h = 0;
        for ( ; p < limit; ++p)
            h = (h >> 28) ^ (h << 4) ^ *p;
        return h;
static PRBool PR_CALLBACK BlobHashEntry::MatchEntry ( PLDHashTable table,
const PLDHashEntryHdr hdr,
const void key 
) [inline, static]

Definition at line 503 of file nsRDFService.cpp.

        const BlobHashEntry *entry =
            NS_STATIC_CAST(const BlobHashEntry *, hdr);

        const BlobImpl::Data *left = &entry->mBlob->mData;

        const BlobImpl::Data *right =
            NS_STATIC_CAST(const BlobImpl::Data *, key);

        return (left->mLength == right->mLength)
            && 0 == memcmp(left->mBytes, right->mBytes, right->mLength);

Here is the call graph for this function:

Member Data Documentation

Definition at line 113 of file pldhash.h.

Definition at line 480 of file nsRDFService.cpp.

The documentation for this struct was generated from the following file: