Why are LinkedList/DynamicArray in the ServerAPI?

Pekka Paalanen ppaalanen at gmail.com
Thu Jan 11 14:08:08 UTC 2018


On Fri, 22 Dec 2017 10:33:05 +0100
Peter He <linhepe at gmail.com> wrote:

> Hi!
> 
> Sorry, I'm a student, and I don't quite get it.
> 
> Why not put generics like dynamic array and linked list into a
> separate/reusable/orthogonal library or just use the standard
> (std::list,std::vector), rather than having custom ones in the Wayland
> Server API?

Hi,

libwayland is written in C, so std::list etc. being C++ features are
not available.

The implementations are so tiny that it does not benefit much to put
them into a separate library, nor pull in an additional dependency for
them either. The implementations are also of a particular flavour -
there are many ways to implement a linked list, with different
characteristics.


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/20180111/64df9216/attachment.sig>


More information about the wayland-devel mailing list