summaryrefslogtreecommitdiffstats
path: root/libopkg/hash_table.h
diff options
context:
space:
mode:
authorticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2008-12-15 00:30:29 (EST)
committer ticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2008-12-15 00:30:29 (EST)
commit733d8409723a397b4ced39ea7aaab8bc8b4af5d9 (patch)
tree7138fbfc11577cf7d0fbae0ae7fa98a02ef63a8e /libopkg/hash_table.h
parent1cefade73444d4670d9ae7c06e8f9cc55492fd79 (diff)
opkg: adding the hash_table_remove API, not using yet.
Just complete the API for future usage. Clean all the entry at initial time. This reduces planty of unnecessary check. In order to prevent this kind of bug, using calloc to replace most malloc git-svn-id: http://opkg.googlecode.com/svn/trunk@160 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
Diffstat (limited to 'libopkg/hash_table.h')
-rw-r--r--libopkg/hash_table.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/libopkg/hash_table.h b/libopkg/hash_table.h
index d4e8a3d..c065609 100644
--- a/libopkg/hash_table.h
+++ b/libopkg/hash_table.h
@@ -39,6 +39,7 @@ int hash_table_init(const char *name, hash_table_t *hash, int len);
void hash_table_deinit(hash_table_t *hash);
void *hash_table_get(hash_table_t *hash, const char *key);
int hash_table_insert(hash_table_t *hash, const char *key, void *value);
+int hash_table_remove(hash_table_t *has, const char *key);
void hash_table_foreach(hash_table_t *hash, void (*f)(const char *key, void *entry, void *data), void *data);
#endif /* _HASH_TABLE_H_ */