mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2026-04-06 07:15:47 -04:00
server: add const qualifier to function arguments where possible
Makes it possible to e.g. `call wl_client_get_credentials` with a `const struct wl_client *` from a global filter callback. Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
This commit is contained in:
parent
597a6b94f5
commit
bdba21ec92
3 changed files with 19 additions and 18 deletions
|
|
@ -227,7 +227,7 @@ typedef void (*wl_global_bind_func_t)(struct wl_client *client, void *data,
|
|||
uint32_t version, uint32_t id);
|
||||
|
||||
uint32_t
|
||||
wl_display_get_serial(struct wl_display *display);
|
||||
wl_display_get_serial(const struct wl_display *display);
|
||||
|
||||
uint32_t
|
||||
wl_display_next_serial(struct wl_display *display);
|
||||
|
|
@ -324,7 +324,7 @@ void
|
|||
wl_client_flush(struct wl_client *client);
|
||||
|
||||
void
|
||||
wl_client_get_credentials(struct wl_client *client,
|
||||
wl_client_get_credentials(const struct wl_client *client,
|
||||
pid_t *pid, uid_t *uid, gid_t *gid);
|
||||
|
||||
int
|
||||
|
|
@ -586,7 +586,7 @@ void
|
|||
wl_resource_destroy(struct wl_resource *resource);
|
||||
|
||||
uint32_t
|
||||
wl_resource_get_id(struct wl_resource *resource);
|
||||
wl_resource_get_id(const struct wl_resource *resource);
|
||||
|
||||
struct wl_list *
|
||||
wl_resource_get_link(struct wl_resource *resource);
|
||||
|
|
@ -607,7 +607,7 @@ void *
|
|||
wl_resource_get_user_data(struct wl_resource *resource);
|
||||
|
||||
int
|
||||
wl_resource_get_version(struct wl_resource *resource);
|
||||
wl_resource_get_version(const struct wl_resource *resource);
|
||||
|
||||
void
|
||||
wl_resource_set_destructor(struct wl_resource *resource,
|
||||
|
|
@ -617,8 +617,9 @@ int
|
|||
wl_resource_instance_of(struct wl_resource *resource,
|
||||
const struct wl_interface *interface,
|
||||
const void *implementation);
|
||||
|
||||
const char *
|
||||
wl_resource_get_class(struct wl_resource *resource);
|
||||
wl_resource_get_class(const struct wl_resource *resource);
|
||||
|
||||
void
|
||||
wl_resource_add_destroy_listener(struct wl_resource *resource,
|
||||
|
|
@ -654,16 +655,16 @@ void *
|
|||
wl_shm_buffer_get_data(struct wl_shm_buffer *buffer);
|
||||
|
||||
int32_t
|
||||
wl_shm_buffer_get_stride(struct wl_shm_buffer *buffer);
|
||||
wl_shm_buffer_get_stride(const struct wl_shm_buffer *buffer);
|
||||
|
||||
uint32_t
|
||||
wl_shm_buffer_get_format(struct wl_shm_buffer *buffer);
|
||||
wl_shm_buffer_get_format(const struct wl_shm_buffer *buffer);
|
||||
|
||||
int32_t
|
||||
wl_shm_buffer_get_width(struct wl_shm_buffer *buffer);
|
||||
wl_shm_buffer_get_width(const struct wl_shm_buffer *buffer);
|
||||
|
||||
int32_t
|
||||
wl_shm_buffer_get_height(struct wl_shm_buffer *buffer);
|
||||
wl_shm_buffer_get_height(const struct wl_shm_buffer *buffer);
|
||||
|
||||
struct wl_shm_pool *
|
||||
wl_shm_buffer_ref_pool(struct wl_shm_buffer *buffer);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue