swc

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.nihaljere.xyz/swc
Log | Files | Refs | README | LICENSE

commit 0d7d34367619a971d39cd14b22f52f80af71143b
parent b1618bf206d5bf5d30eedc18d79b9d61638c25f3
Author: Michael Forney <mforney@mforney.org>
Date:   Thu, 29 Aug 2019 21:09:54 -0700

Make interface implementations const

Diffstat:
Mlibswc/compositor.c | 4++--
Mlibswc/data.c | 4++--
Mlibswc/data_device.c | 2+-
Mlibswc/data_device_manager.c | 2+-
Mlibswc/keyboard.c | 2+-
Mlibswc/pointer.c | 2+-
Mlibswc/seat.c | 2+-
Mlibswc/shm.c | 4++--
Mlibswc/subcompositor.c | 2+-
Mlibswc/subsurface.c | 2+-
10 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/libswc/compositor.c b/libswc/compositor.c @@ -412,7 +412,7 @@ move(struct view *base, int32_t x, int32_t y) return true; } -const static struct view_impl view_impl = { +static const struct view_impl view_impl = { .update = update, .attach = attach, .move = move, @@ -766,7 +766,7 @@ create_region(struct wl_client *client, struct wl_resource *resource, uint32_t i wl_resource_post_no_memory(resource); } -static struct wl_compositor_interface compositor_impl = { +static const struct wl_compositor_interface compositor_impl = { .create_surface = create_surface, .create_region = create_region, }; diff --git a/libswc/data.c b/libswc/data.c @@ -66,7 +66,7 @@ offer_destroy(struct wl_client *client, struct wl_resource *offer) wl_resource_destroy(offer); } -static struct wl_data_offer_interface data_offer_impl = { +static const struct wl_data_offer_interface data_offer_impl = { .accept = offer_accept, .receive = offer_receive, .destroy = offer_destroy, @@ -88,7 +88,7 @@ source_destroy(struct wl_client *client, struct wl_resource *source) wl_resource_destroy(source); } -static struct wl_data_source_interface data_source_impl = { +static const struct wl_data_source_interface data_source_impl = { .offer = source_offer, .destroy = source_destroy, }; diff --git a/libswc/data_device.c b/libswc/data_device.c @@ -56,7 +56,7 @@ set_selection(struct wl_client *client, struct wl_resource *resource, struct wl_ send_event(&data_device->event_signal, DATA_DEVICE_EVENT_SELECTION_CHANGED, NULL); } -static struct wl_data_device_interface data_device_impl = { +static const struct wl_data_device_interface data_device_impl = { .start_drag = start_drag, .set_selection = set_selection, }; diff --git a/libswc/data_device_manager.c b/libswc/data_device_manager.c @@ -46,7 +46,7 @@ get_data_device(struct wl_client *client, struct wl_resource *resource, uint32_t data_device_bind(seat->data_device, client, wl_resource_get_version(resource), id); } -static struct wl_data_device_manager_interface data_device_manager_impl = { +static const struct wl_data_device_manager_interface data_device_manager_impl = { .create_data_source = create_data_source, .get_data_device = get_data_device, }; diff --git a/libswc/keyboard.c b/libswc/keyboard.c @@ -299,7 +299,7 @@ release(struct wl_client *client, struct wl_resource *resource) wl_resource_destroy(resource); } -static struct wl_keyboard_interface keyboard_impl = { +static const struct wl_keyboard_interface keyboard_impl = { .release = release, }; diff --git a/libswc/pointer.c b/libswc/pointer.c @@ -337,7 +337,7 @@ release(struct wl_client *client, struct wl_resource *resource) wl_resource_destroy(resource); } -static struct wl_pointer_interface pointer_impl = { +static const struct wl_pointer_interface pointer_impl = { .set_cursor = set_cursor, .release = release, }; diff --git a/libswc/seat.c b/libswc/seat.c @@ -141,7 +141,7 @@ get_touch(struct wl_client *client, struct wl_resource *resource, uint32_t id) /* XXX: Implement */ } -static struct wl_seat_interface seat_impl = { +static const struct wl_seat_interface seat_impl = { .get_pointer = get_pointer, .get_keyboard = get_keyboard, .get_touch = get_touch, diff --git a/libswc/shm.c b/libswc/shm.c @@ -153,7 +153,7 @@ resize(struct wl_client *client, struct wl_resource *resource, int32_t size) pool->size = size; } -static struct wl_shm_pool_interface shm_pool_impl = { +static const struct wl_shm_pool_interface shm_pool_impl = { .create_buffer = create_buffer, .destroy = destroy, .resize = resize, @@ -195,7 +195,7 @@ error0: close(fd); } -static struct wl_shm_interface shm_impl = { +static const struct wl_shm_interface shm_impl = { .create_pool = &create_pool }; diff --git a/libswc/subcompositor.c b/libswc/subcompositor.c @@ -48,7 +48,7 @@ get_subsurface(struct wl_client *client, struct wl_resource *resource, } } -static struct wl_subcompositor_interface subcompositor_impl = { +static const struct wl_subcompositor_interface subcompositor_impl = { .destroy = destroy, .get_subsurface = get_subsurface, }; diff --git a/libswc/subsurface.c b/libswc/subsurface.c @@ -62,7 +62,7 @@ set_desync(struct wl_client *client, struct wl_resource *resource) /* TODO: Implement. */ } -static struct wl_subsurface_interface subsurface_impl = { +static const struct wl_subsurface_interface subsurface_impl = { .destroy = destroy, .set_position = set_position, .place_above = place_above,