/**
* Key lookup/associative container.
*
- * Like Jose's u_hash_table, based on CSO cache code for now.
+ * Like Jose's util_hash_table, based on CSO cache code for now.
*
* Author: Brian Paul
*/
#include "pipe/p_compiler.h"
-#include "pipe/p_debug.h"
-#include "pipe/p_error.h"
+#include "util/u_debug.h"
#include "cso_cache/cso_hash.h"
struct cso_hash_iter iter;
assert(map);
+ if (!map)
+ return FALSE;
key_hash = hash(key, map->key_size);
struct keymap_item *item;
assert(map);
+ if (!map)
+ return NULL;
key_hash = hash(key, map->key_size);
struct keymap_item *item;
assert(map);
+ if (!map)
+ return;
key_hash = hash(key, map->key_size);
item = hash_table_item(iter);
assert(item);
+ if (!item)
+ return;
map->delete_func(map, item->key, item->value, user);
FREE(item->key);
FREE(item);
struct keymap_item *item;
assert(map);
-
+ if (!map)
+ return;
+
iter = cso_hash_first_node(map->cso);
while (!cso_hash_iter_is_null(iter)) {
item = (struct keymap_item *)