#include "system.h"
#include <rpmlib.h>
#include "rpmhash.h"
#include "debug.h"
Go to the source code of this file.
Data Structures | |
struct | hashBucket |
struct | hashTable_s |
Typedefs | |
typedef const void * | voidptr |
Functions | |
hashBucket * | findEntry (hashTable ht, const void *key) |
Find entry in hash table. More... | |
int | hashEqualityString (const void *key1, const void *key2) |
Compare two hash table entries for equality. More... | |
unsigned int | hashFunctionString (const void *string) |
Return hash value of a string. More... | |
hashTable | htCreate (int numBuckets, int keySize, int freeData, hashFunctionType fn, hashEqualityType eq) |
Create hash table. More... | |
void | htAddEntry (hashTable ht, const void *key, const void *data) |
Add item to hash table. More... | |
void | htFree (hashTable ht) |
Destroy hash table. More... | |
int | htHasEntry (hashTable ht, const void *key) |
Check for key in hash table. More... | |
int | htGetEntry (hashTable ht, const void *key, const void ***data, int *dataCount, const void **tableKey) |
Retrieve item from hash table. More... |
Definition in file rpmhash.c.
|
|
|
Find entry in hash table.
Definition at line 38 of file rpmhash.c. References hashBucket::key, and hashBucket::next. |
|
Compare two hash table entries for equality.
|
|
Return hash value of a string.
|
|
Add item to hash table.
Definition at line 95 of file rpmhash.c. References hashBucket::data, hashBucket::dataCount, hashBucket::key, hashBucket::next, xmalloc, and xrealloc. |
|
Create hash table. If keySize > 0, the key is duplicated within the table (which costs memory, but may be useful anyway.
Definition at line 79 of file rpmhash.c. References hashEqualityType, hashFunctionType, xcalloc, and xmalloc. |
|
Destroy hash table.
Definition at line 125 of file rpmhash.c. References _free, hashBucket::data, hashBucket::key, and hashBucket::next. |
|
Retrieve item from hash table.
Definition at line 156 of file rpmhash.c. References hashBucket::data, hashBucket::dataCount, findEntry, and hashBucket::key. |
|
Check for key in hash table.
Definition at line 149 of file rpmhash.c. References findEntry. |