Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

Add static+const qualifiers #2720

Merged
merged 3 commits into from
Feb 5, 2021
Merged

Add static+const qualifiers #2720

merged 3 commits into from
Feb 5, 2021

Conversation

mstoeckl
Copy link
Contributor

@mstoeckl mstoeckl commented Feb 5, 2021

The three commits in this PR add const (and in one case, file-static) qualifiers to global variables that were missing them.

  • The list of atoms in xwayland/xwm.c
  • The cursor data used by the default theme
  • A number of "implementation function lists", which include structs of function pointers for wlroots backends, and for handling Wayland events and requests

Since xwayland/xwm.h is an internal header, and wlr/interfaces/wlr_tablet_tool.h and wlr/types/wlr_tablet_tool.h are unstable API, I presume changing types slightly is fine.

I found these variables by checking objdump -t libwlroots.so.7 | grep "\.data" for initialized global variables not linked as read only. I did not look at tinywl or any of the examples.


Breaking change: wlr_tablet.impl is now const.

This requires a change to the type of `struct wlr_tablet` and
`wlr_tablet_init` signature, both of which are part of the unstable API.
@emersion emersion added the breaking Breaking change in public API label Feb 5, 2021
Copy link
Member

@emersion emersion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@emersion emersion merged commit a290d7a into swaywm:master Feb 5, 2021
@emersion emersion mentioned this pull request Mar 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
breaking Breaking change in public API
Development

Successfully merging this pull request may close these issues.

None yet

2 participants