From 166feaea3394e00af14418e074ae090e31922f33 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Sat, 14 Aug 2021 09:03:23 +0000 Subject: Make libseat_seat_listener const libseat will never write to that struct. Let's allow callers to make it read-only. --- include/backend.h | 2 +- include/libseat.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/backend.h b/include/backend.h index 075f48c..8f6ff39 100644 --- a/include/backend.h +++ b/include/backend.h @@ -16,7 +16,7 @@ struct named_backend { }; struct seat_impl { - struct libseat *(*open_seat)(struct libseat_seat_listener *listener, void *data); + struct libseat *(*open_seat)(const struct libseat_seat_listener *listener, void *data); int (*disable_seat)(struct libseat *seat); int (*close_seat)(struct libseat *seat); const char *(*seat_name)(struct libseat *seat); diff --git a/include/libseat.h b/include/libseat.h index 82098ea..2647fb9 100644 --- a/include/libseat.h +++ b/include/libseat.h @@ -55,7 +55,7 @@ struct libseat_seat_listener { * Returns a pointer to an opaque libseat struct on success. Returns NULL and * sets errno on error. */ -struct libseat *libseat_open_seat(struct libseat_seat_listener *listener, void *userdata); +struct libseat *libseat_open_seat(const struct libseat_seat_listener *listener, void *userdata); /* * Disables a seat, used in response to a disable_seat event. After disabling -- cgit v1.2.3