mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-02 09:01:39 -05: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
|
|
@ -445,7 +445,7 @@ wl_shm_buffer_get(struct wl_resource *resource)
|
|||
}
|
||||
|
||||
WL_EXPORT int32_t
|
||||
wl_shm_buffer_get_stride(struct wl_shm_buffer *buffer)
|
||||
wl_shm_buffer_get_stride(const struct wl_shm_buffer *buffer)
|
||||
{
|
||||
return buffer->stride;
|
||||
}
|
||||
|
|
@ -479,19 +479,19 @@ wl_shm_buffer_get_data(struct wl_shm_buffer *buffer)
|
|||
}
|
||||
|
||||
WL_EXPORT uint32_t
|
||||
wl_shm_buffer_get_format(struct wl_shm_buffer *buffer)
|
||||
wl_shm_buffer_get_format(const struct wl_shm_buffer *buffer)
|
||||
{
|
||||
return buffer->format;
|
||||
}
|
||||
|
||||
WL_EXPORT int32_t
|
||||
wl_shm_buffer_get_width(struct wl_shm_buffer *buffer)
|
||||
wl_shm_buffer_get_width(const struct wl_shm_buffer *buffer)
|
||||
{
|
||||
return buffer->width;
|
||||
}
|
||||
|
||||
WL_EXPORT int32_t
|
||||
wl_shm_buffer_get_height(struct wl_shm_buffer *buffer)
|
||||
wl_shm_buffer_get_height(const struct wl_shm_buffer *buffer)
|
||||
{
|
||||
return buffer->height;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue