Changeset 560 for trunk/psLib/src/sysUtils/psHash.h
- Timestamp:
- May 1, 2004, 1:04:35 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/sysUtils/psHash.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/sysUtils/psHash.h
r494 r560 8 8 9 9 /** DO WE NEED TO DEFINE HashTable? */ 10 typedef struct HashTable psHash; ///< Opaque type for a hash table 10 //typedef struct HashTable psHash; ///< Opaque type for a hash table 11 // An entire hash table 12 13 // A bucket that holds an item of data 14 typedef struct psHashBucket 15 { 16 char *key; // key for this item of data 17 void *data; // the data itself 18 struct psHashBucket *next; // list of other possible keys 19 } 20 psHashBucket; 21 22 typedef struct psHash 23 { 24 int nbucket; 25 psHashBucket **buckets; 26 } 27 psHash; 11 28 12 29 /** Functions **************************************************************/ … … 19 36 20 37 /// Free hash buckets from table. 21 void psHashFree(psHash *table, ///< hash table to be freed38 void psHashFree(psHash *table, ///< hash table to be freed 22 39 void (*itemFree)(void *item) ///< how to free hashed data; or NULL 23 40 ); 24 41 25 42 /// Insert entry into table. 26 void *psHashInsert(psHash *table, ///< table to insert in27 const char *key, ///< key to use28 void *data, ///< data to insert43 void *psHashInsert(psHash *table, ///< table to insert in 44 const char *key, ///< key to use 45 void *data, ///< data to insert 29 46 void (*itemFree)(void *item) ///< how to free hashed data; or NULL 30 47 );
Note:
See TracChangeset
for help on using the changeset viewer.
