Added comment about hashtable

This commit is contained in:
Dale Weiler 2012-11-23 20:05:53 +00:00
parent 6e047ec65b
commit 9d677bab7c

View file

@ -270,6 +270,13 @@ typedef struct hash_table_t {
/*
* hashtable implementation:
*
* Note:
* This was designed for pointers: you manage the life of the object yourself
* if you do use this for non-pointers please be warned that the object may not
* be valid if the duration of it exceeds (i.e on stack). So you need to allocate
* yourself, or put those in global scope to ensure duration is for the whole
* runtime.
*
* util_htnew(size) -- to make a new hashtable
* util_htset(table, key, value, sizeof(value)) -- to set something in the table
* util_htget(table, key) -- to get something from the table