[PATCH wayland] shm: Make shm_pool_interface static const
Pekka Paalanen
ppaalanen at gmail.com
Tue Aug 16 08:12:35 UTC 2016
On Fri, 12 Aug 2016 12:41:47 -0700
Bryce Harrington <bryce at osg.samsung.com> wrote:
> On Fri, Aug 12, 2016 at 12:04:41PM -0700, Yong Bakos wrote:
> > From: Yong Bakos <ybakos at humanoriented.com>
> >
> > Add static const modifiers to the shm_pool_interface definition,
> > making it consistent with the other wl_*_interface definitions and
> > mundanely safer.
> >
> > Note that this does not affect the ABI, according to abi-dumper and
> > abi-compliance-checker[1]; and weston and its shm-backed clients still
> > run as expected.
> >
> > [1]: http://lvc.github.io/abi-compliance-checker/
> >
> > Signed-off-by: Yong Bakos <ybakos at humanoriented.com>
> > Tested-by: Yong Bakos <ybakos at humanoriented.com>
>
> Acked-by: Bryce Harrington <bryce at osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
I don't see the symbol exported, so this should be completely safe
indeed.
Thanks,
pq
> > ---
> > src/wayland-shm.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/src/wayland-shm.c b/src/wayland-shm.c
> > index 7fea364..8e2ef77 100644
> > --- a/src/wayland-shm.c
> > +++ b/src/wayland-shm.c
> > @@ -247,7 +247,7 @@ shm_pool_resize(struct wl_client *client, struct wl_resource *resource,
> > shm_pool_finish_resize(pool);
> > }
> >
> > -struct wl_shm_pool_interface shm_pool_interface = {
> > +static const struct wl_shm_pool_interface shm_pool_interface = {
> > shm_pool_create_buffer,
> > shm_pool_destroy,
> > shm_pool_resize
> > --
> > 2.7.2
> >
> > _______________________________________________
> > wayland-devel mailing list
> > wayland-devel at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/wayland-devel
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/wayland-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 811 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20160816/2893a6bf/attachment.sig>
More information about the wayland-devel
mailing list