mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-10-29 05:40:16 -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
|
|
@ -619,7 +619,7 @@ err_client:
|
|||
* \memberof wl_client
|
||||
*/
|
||||
WL_EXPORT 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)
|
||||
{
|
||||
if (pid)
|
||||
|
|
@ -799,7 +799,7 @@ wl_resource_destroy(struct wl_resource *resource)
|
|||
}
|
||||
|
||||
WL_EXPORT uint32_t
|
||||
wl_resource_get_id(struct wl_resource *resource)
|
||||
wl_resource_get_id(const struct wl_resource *resource)
|
||||
{
|
||||
return resource->object.id;
|
||||
}
|
||||
|
|
@ -853,7 +853,7 @@ wl_resource_get_user_data(struct wl_resource *resource)
|
|||
}
|
||||
|
||||
WL_EXPORT int
|
||||
wl_resource_get_version(struct wl_resource *resource)
|
||||
wl_resource_get_version(const struct wl_resource *resource)
|
||||
{
|
||||
return resource->version;
|
||||
}
|
||||
|
|
@ -900,7 +900,7 @@ wl_resource_get_destroy_listener(struct wl_resource *resource,
|
|||
* \memberof wl_resource
|
||||
*/
|
||||
WL_EXPORT const char *
|
||||
wl_resource_get_class(struct wl_resource *resource)
|
||||
wl_resource_get_class(const struct wl_resource *resource)
|
||||
{
|
||||
return resource->object.interface->name;
|
||||
}
|
||||
|
|
@ -1496,7 +1496,7 @@ wl_global_set_user_data(struct wl_global *global, void *data)
|
|||
* \memberof wl_display
|
||||
*/
|
||||
WL_EXPORT uint32_t
|
||||
wl_display_get_serial(struct wl_display *display)
|
||||
wl_display_get_serial(const struct wl_display *display)
|
||||
{
|
||||
return display->serial;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue