Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Typedefs | Functions | Variables
jshash.h File Reference
#include <stddef.h>
#include <stdio.h>
#include "jstypes.h"
#include "jscompat.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  JSHashAllocOps
struct  JSHashEntry
struct  JSHashTable

Defines

#define JS_HASH_BITS   32
#define JS_GOLDEN_RATIO   0x9E3779B9U
#define HT_ENUMERATE_NEXT   0 /* continue enumerating entries */
#define HT_ENUMERATE_STOP   1 /* stop enumerating entries */
#define HT_ENUMERATE_REMOVE   2 /* remove and free the current entry */
#define HT_FREE_VALUE   0 /* just free the entry's value */
#define HT_FREE_ENTRY   1 /* free value and entire entry */

Typedefs

typedef struct JSHashEntry
typedef struct JSHashTable
typedef JSHashNumber(* JS_DLL_CALLBACK )(const void *key)
typedef struct JSHashAllocOps JSHashAllocOps

Functions

 JS_PUBLIC_API (JSHashTable *) JS_NewHashTable(uint32 n
 JS_PUBLIC_API (void) JS_HashTableDestroy(JSHashTable *ht)
 JS_PUBLIC_API (JSHashEntry **) JS_HashTableRawLookup(JSHashTable *ht
 JS_PUBLIC_API (JSHashEntry *) JS_HashTableRawAdd(JSHashTable *ht
 JS_PUBLIC_API (JSBool) JS_HashTableRemove(JSHashTable *ht
 JS_PUBLIC_API (void *) JS_HashTableLookup(JSHashTable *ht
 JS_PUBLIC_API (JSHashNumber) JS_HashString(const void *key)

Variables

JS_BEGIN_EXTERN_C typedef uint32 JSHashNumber
JSHashFunction keyHash
JSHashFunction JSHashComparator keyCompare
JSHashFunction
JSHashComparator
JSHashComparator 
valueCompare
JSHashFunction
JSHashComparator
JSHashComparator
JSHashAllocOps
allocOps
JSHashFunction
JSHashComparator
JSHashComparator
JSHashAllocOps void
allocPriv
JSHashNumber const voidkey
JSHashEntry ** hep
JSHashEntry JSHashNumber const
void void
value
JSHashEntry JSHashEntryhe
JSHashEnumerator f
JSHashEnumerator voidarg
JSHashEnumerator dump
JSHashEnumerator FILEfp
const voidv2

Class Documentation

struct JSHashEntry

Definition at line 78 of file jshash.h.

Collaboration diagram for JSHashEntry:
Class Members
const void * key
JSHashNumber keyHash
JSHashEntry * next
void * value
struct JSHashTable

Definition at line 85 of file jshash.h.

Collaboration diagram for JSHashTable:
Class Members
JSHashAllocOps * allocOps
void * allocPriv
JSHashEntry ** buckets
JSHashComparator keyCompare
JSHashFunction keyHash
uint32 nentries
uint32 shift
JSHashComparator valueCompare

Define Documentation

#define HT_ENUMERATE_NEXT   0 /* continue enumerating entries */

Definition at line 64 of file jshash.h.

Definition at line 66 of file jshash.h.

#define HT_ENUMERATE_STOP   1 /* stop enumerating entries */

Definition at line 65 of file jshash.h.

#define HT_FREE_ENTRY   1 /* free value and entire entry */

Definition at line 76 of file jshash.h.

#define HT_FREE_VALUE   0 /* just free the entry's value */

Definition at line 75 of file jshash.h.

#define JS_GOLDEN_RATIO   0x9E3779B9U

Definition at line 57 of file jshash.h.

#define JS_HASH_BITS   32

Definition at line 56 of file jshash.h.


Typedef Documentation

Definition at line 59 of file jshash.h.

typedef struct JSHashEntry

Definition at line 53 of file jshash.h.

typedef struct JSHashTable

Definition at line 54 of file jshash.h.


Function Documentation

Definition at line 58 of file jslog2.c.

{
    JSIntn log2;

    JS_FLOOR_LOG2(log2, n);
    return log2;
}

Variable Documentation

JSHashFunction JSHashComparator JSHashComparator JSHashAllocOps* allocOps

Definition at line 107 of file jshash.h.

JSHashFunction JSHashComparator JSHashComparator JSHashAllocOps void* allocPriv

Definition at line 107 of file jshash.h.

JSHashEnumerator void* arg

Definition at line 133 of file jshash.h.

JSHashEnumerator dump

Definition at line 139 of file jshash.h.

JSHashEnumerator f

Definition at line 133 of file jshash.h.

JSHashEnumerator FILE* fp

Definition at line 139 of file jshash.h.

Definition at line 123 of file jshash.h.

Definition at line 119 of file jshash.h.

Definition at line 52 of file jshash.h.

Definition at line 116 of file jshash.h.

JSHashFunction JSHashComparator keyCompare

Definition at line 107 of file jshash.h.

Definition at line 107 of file jshash.h.

Definition at line 147 of file jshash.h.

Definition at line 119 of file jshash.h.

JSHashFunction JSHashComparator JSHashComparator valueCompare

Definition at line 107 of file jshash.h.