[PATCH wayland 2/3] scanner: Allow adding a prefix to exported symbols
Pekka Paalanen
ppaalanen at gmail.com
Mon Jul 24 11:16:04 UTC 2017
On Mon, 3 Jul 2017 17:16:45 +0800
Jonas Ådahl <jadahl at gmail.com> wrote:
> Two different protocols may use interfaces with identical names.
> Implementing support for both those protocols would result in symbol
> clashes, as wayland-scanner generates symbols from the interface names.
>
> Make it possible to avoiding these clashes by adding a way to add a
> prefix to the symbols generated by wayland-scanner. Implementations
> (servers and clients) can then use these prefix:ed symbols to implement
> different objects with the same name.
>
> Signed-off-by: Jonas Ådahl <jadahl at gmail.com>
> ---
>
> Something like this would be needed if a compositor/client wants to implement
> xdg-shell unstable v5 alongside xdg-shell stable, unless we want to rename all
> our xdg-shell interfaces. Implementing xdg-shell unstable v6 alongside
> xdg-shell stable does not have this issue.
>
> See issue raised here:
> https://lists.freedesktop.org/archives/wayland-devel/2017-June/034380.html
>
>
> Jonas
>
>
> src/scanner.c | 94 ++++++++++++++++++++++++++++++++++++++++++++++-------------
> 1 file changed, 73 insertions(+), 21 deletions(-)
Hi,
while this seems to change the ABI symbol names, it does not change the
names in the documentation, and it does not change the names of
#defines of enums, or the inline functions. That means that this is not
enough to fulfill the purpose: being able to use two similarly named
but different protocols by adding a prefix.
For the idea:
Acked-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
But I think it needs to apply the prefix to *everything*, both ABI and
API.
Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20170724/a8328077/attachment.sig>
More information about the wayland-devel
mailing list