summaryrefslogtreecommitdiff
path: root/src/connection.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2011-08-19 22:50:53 -0400
committerKristian Høgsberg <krh@bitplanet.net>2011-08-27 12:06:11 -0400
commitc8147edc3afea143a2e3328c22c4daf9ae70a6f2 (patch)
tree201373fcf481d3aa3e956910fe2e93b79c19ac26 /src/connection.c
parent4a39081c1d4a8d9aa3a6c86e48924142a3406b24 (diff)
Store objects in wl_map data structure
The wl_map data structure is just an array with a free-list that lets the client recycle unused client IDs and keep range of client IDs under control.
Diffstat (limited to 'src/connection.c')
-rw-r--r--src/connection.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/connection.c b/src/connection.c
index cfdc8d8..1963314 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -495,7 +495,7 @@ wl_connection_vmarshal(struct wl_connection *connection,
struct wl_closure *
wl_connection_demarshal(struct wl_connection *connection,
uint32_t size,
- struct wl_hash_table *objects,
+ struct wl_map *objects,
const struct wl_message *message)
{
uint32_t *p, *next, *end, length;
@@ -586,7 +586,7 @@ wl_connection_demarshal(struct wl_connection *connection,
extra += sizeof *object;
closure->args[i] = object;
- *object = wl_hash_table_lookup(objects, *p);
+ *object = wl_map_lookup(objects, *p);
if (*object == NULL && *p != 0) {
printf("unknown object (%d), message %s(%s)\n",
*p, message->name, message->signature);
@@ -599,7 +599,7 @@ wl_connection_demarshal(struct wl_connection *connection,
case 'n':
closure->types[i] = &ffi_type_uint32;
closure->args[i] = p;
- object = wl_hash_table_lookup(objects, *p);
+ object = wl_map_lookup(objects, *p);
if (*p == 0 || object != NULL) {
printf("not a new object (%d), "
"message %s(%s)\n",