commit 0d7d343
Michael Forney
·
2019-08-30 04:09:54 +0000 UTC
parent b1618bf
Make interface implementations const
10 files changed,
+13,
-13
+2,
-2
1@@ -412,7 +412,7 @@ move(struct view *base, int32_t x, int32_t y)
2 return true;
3 }
4
5-const static struct view_impl view_impl = {
6+static const struct view_impl view_impl = {
7 .update = update,
8 .attach = attach,
9 .move = move,
10@@ -766,7 +766,7 @@ create_region(struct wl_client *client, struct wl_resource *resource, uint32_t i
11 wl_resource_post_no_memory(resource);
12 }
13
14-static struct wl_compositor_interface compositor_impl = {
15+static const struct wl_compositor_interface compositor_impl = {
16 .create_surface = create_surface,
17 .create_region = create_region,
18 };
+2,
-2
1@@ -66,7 +66,7 @@ offer_destroy(struct wl_client *client, struct wl_resource *offer)
2 wl_resource_destroy(offer);
3 }
4
5-static struct wl_data_offer_interface data_offer_impl = {
6+static const struct wl_data_offer_interface data_offer_impl = {
7 .accept = offer_accept,
8 .receive = offer_receive,
9 .destroy = offer_destroy,
10@@ -88,7 +88,7 @@ source_destroy(struct wl_client *client, struct wl_resource *source)
11 wl_resource_destroy(source);
12 }
13
14-static struct wl_data_source_interface data_source_impl = {
15+static const struct wl_data_source_interface data_source_impl = {
16 .offer = source_offer,
17 .destroy = source_destroy,
18 };
+1,
-1
1@@ -56,7 +56,7 @@ set_selection(struct wl_client *client, struct wl_resource *resource, struct wl_
2 send_event(&data_device->event_signal, DATA_DEVICE_EVENT_SELECTION_CHANGED, NULL);
3 }
4
5-static struct wl_data_device_interface data_device_impl = {
6+static const struct wl_data_device_interface data_device_impl = {
7 .start_drag = start_drag,
8 .set_selection = set_selection,
9 };
+1,
-1
1@@ -46,7 +46,7 @@ get_data_device(struct wl_client *client, struct wl_resource *resource, uint32_t
2 data_device_bind(seat->data_device, client, wl_resource_get_version(resource), id);
3 }
4
5-static struct wl_data_device_manager_interface data_device_manager_impl = {
6+static const struct wl_data_device_manager_interface data_device_manager_impl = {
7 .create_data_source = create_data_source,
8 .get_data_device = get_data_device,
9 };
+1,
-1
1@@ -299,7 +299,7 @@ release(struct wl_client *client, struct wl_resource *resource)
2 wl_resource_destroy(resource);
3 }
4
5-static struct wl_keyboard_interface keyboard_impl = {
6+static const struct wl_keyboard_interface keyboard_impl = {
7 .release = release,
8 };
9
+1,
-1
1@@ -337,7 +337,7 @@ release(struct wl_client *client, struct wl_resource *resource)
2 wl_resource_destroy(resource);
3 }
4
5-static struct wl_pointer_interface pointer_impl = {
6+static const struct wl_pointer_interface pointer_impl = {
7 .set_cursor = set_cursor,
8 .release = release,
9 };
+1,
-1
1@@ -141,7 +141,7 @@ get_touch(struct wl_client *client, struct wl_resource *resource, uint32_t id)
2 /* XXX: Implement */
3 }
4
5-static struct wl_seat_interface seat_impl = {
6+static const struct wl_seat_interface seat_impl = {
7 .get_pointer = get_pointer,
8 .get_keyboard = get_keyboard,
9 .get_touch = get_touch,
+2,
-2
1@@ -153,7 +153,7 @@ resize(struct wl_client *client, struct wl_resource *resource, int32_t size)
2 pool->size = size;
3 }
4
5-static struct wl_shm_pool_interface shm_pool_impl = {
6+static const struct wl_shm_pool_interface shm_pool_impl = {
7 .create_buffer = create_buffer,
8 .destroy = destroy,
9 .resize = resize,
10@@ -195,7 +195,7 @@ error0:
11 close(fd);
12 }
13
14-static struct wl_shm_interface shm_impl = {
15+static const struct wl_shm_interface shm_impl = {
16 .create_pool = &create_pool
17 };
18
+1,
-1
1@@ -48,7 +48,7 @@ get_subsurface(struct wl_client *client, struct wl_resource *resource,
2 }
3 }
4
5-static struct wl_subcompositor_interface subcompositor_impl = {
6+static const struct wl_subcompositor_interface subcompositor_impl = {
7 .destroy = destroy,
8 .get_subsurface = get_subsurface,
9 };
+1,
-1
1@@ -62,7 +62,7 @@ set_desync(struct wl_client *client, struct wl_resource *resource)
2 /* TODO: Implement. */
3 }
4
5-static struct wl_subsurface_interface subsurface_impl = {
6+static const struct wl_subsurface_interface subsurface_impl = {
7 .destroy = destroy,
8 .set_position = set_position,
9 .place_above = place_above,