Back to index

lightning-sunbird  0.9+nobinonly
Static Public Member Functions | Public Attributes | Static Public Attributes
XPCNativeScriptableSharedMap::Entry Struct Reference

#include <xpcmaps.h>

Inheritance diagram for XPCNativeScriptableSharedMap::Entry:
Inheritance graph
Collaboration diagram for XPCNativeScriptableSharedMap::Entry:
Collaboration graph

List of all members.

Static Public Member Functions

static JSDHashNumber
Hash (JSDHashTable *table, const void *key)
static JSBool JS_DLL_CALLBACK Match (JSDHashTable *table, const JSDHashEntryHdr *entry, const void *key)

Public Attributes

JSDHashNumber keyHash

Static Public Attributes

static struct JSDHashTableOps

Detailed Description

Definition at line 584 of file xpcmaps.h.

Member Function Documentation

Definition at line 505 of file xpcmaps.cpp.

    JSDHashNumber h;
    const unsigned char *s;

    XPCNativeScriptableShared* obj =
        (XPCNativeScriptableShared*) key;

    // hash together the flags and the classname string

    h = (JSDHashNumber) obj->GetFlags();
    for (s = (const unsigned char*) obj->GetJSClass()->name; *s != '\0'; s++)
        h = (h >> (JS_DHASH_BITS - 4)) ^ (h << 4) ^ *s;
    return h;

Here is the call graph for this function:

Definition at line 522 of file xpcmaps.cpp.

    XPCNativeScriptableShared* obj1 =
        ((XPCNativeScriptableSharedMap::Entry*) entry)->key;

    XPCNativeScriptableShared* obj2 =
        (XPCNativeScriptableShared*) key;

    // match the flags and the classname string

    if(obj1->GetFlags() != obj2->GetFlags())
        return JS_FALSE;

    const char* name1 = obj1->GetJSClass()->name;
    const char* name2 = obj2->GetJSClass()->name;

    if(!name1 || !name2)
        return name1 == name2;

    return 0 == strcmp(name1, name2);

Here is the call graph for this function:

Member Data Documentation

Definition at line 596 of file xpcmaps.h.

Definition at line 586 of file xpcmaps.h.

Definition at line 114 of file jsdhash.h.

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