diff options
author | Simon Ser <contact@emersion.fr> | 2021-08-14 09:03:23 +0000 |
---|---|---|
committer | Kenny Levinsen <kl@kl.wtf> | 2021-08-15 13:33:30 +0200 |
commit | 166feaea3394e00af14418e074ae090e31922f33 (patch) | |
tree | 64a32fb03bd591d44e5d29816b451e72a6700a95 /include | |
parent | 309650aa4d4be1310b20e7293a3bc0c47aeecf0e (diff) | |
download | seatd-166feaea3394e00af14418e074ae090e31922f33.tar.xz |
Make libseat_seat_listener const
libseat will never write to that struct. Let's allow callers to
make it read-only.
Diffstat (limited to 'include')
-rw-r--r-- | include/backend.h | 2 | ||||
-rw-r--r-- | include/libseat.h | 2 |
2 files changed, 2 insertions, 2 deletions
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 |