summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2011-08-27 12:05:09 -0400
committerKristian Høgsberg <krh@bitplanet.net>2011-08-27 12:06:11 -0400
commitb15259bff48aa5a1f4f4c2a0675ce06e50a8c82f (patch)
tree0242c6a3531a5c0e01024998416e04231e75e5b0
parent990809c0637a15edbdf75753afdea537e057fd34 (diff)
server: Pass struct wl_resource for object references
-rw-r--r--src/scanner.c6
-rw-r--r--src/wayland-shm.c3
2 files changed, 7 insertions, 2 deletions
diff --git a/src/scanner.c b/src/scanner.c
index d6e8969..a2d3368 100644
--- a/src/scanner.c
+++ b/src/scanner.c
@@ -526,7 +526,11 @@ emit_structs(struct wl_list *message_list, struct interface *interface)
wl_list_for_each(a, &m->arg_list, link) {
printf(",\n%s", indent(n));
- emit_type(a);
+ if (is_interface && a->type == OBJECT)
+ printf("struct wl_resource *");
+ else
+ emit_type(a);
+
printf("%s", a->name);
}
diff --git a/src/wayland-shm.c b/src/wayland-shm.c
index 0324168..d58d85e 100644
--- a/src/wayland-shm.c
+++ b/src/wayland-shm.c
@@ -115,10 +115,11 @@ wl_shm_buffer_init(struct wl_shm *shm, struct wl_client *client, uint32_t id,
static void
shm_create_buffer(struct wl_client *client, struct wl_resource *resource,
uint32_t id, int fd, int32_t width, int32_t height,
- uint32_t stride, struct wl_visual *visual)
+ uint32_t stride, struct wl_resource *visual_resource)
{
struct wl_shm *shm = resource->data;
struct wl_shm_buffer *buffer;
+ struct wl_visual *visual = visual_resource->data;
void *data;
if (!visual || visual->object.interface != &wl_visual_interface) {