4 int wl_hash_insert(struct wl_hash *hash, struct wl_object *object)
6 struct wl_object **objects;
9 if (hash->count == hash->alloc) {
13 alloc = hash->alloc * 2;
14 objects = realloc(hash->objects, alloc * sizeof *objects);
18 hash->objects = objects;
22 hash->objects[hash->count] = object;
29 wl_hash_lookup(struct wl_hash *hash, uint32_t id)
33 for (i = 0; i < hash->count; i++) {
34 if (hash->objects[i]->id == id)
35 return hash->objects[i];
42 wl_hash_delete(struct wl_hash *hash, struct wl_object *object)