diff options
author | wm4 <wm4@nowhere> | 2018-05-18 20:30:56 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2018-05-24 19:56:35 +0200 |
commit | 782e4282841fae59d60b16ddfc00bb45cf40771e (patch) | |
tree | b4afa47d6dfc63f674d42f80d8aa8dd74a34cf3d /player | |
parent | 094f6be60041c67359a29dec905e66129b538afa (diff) | |
download | mpv-782e4282841fae59d60b16ddfc00bb45cf40771e.tar.bz2 mpv-782e4282841fae59d60b16ddfc00bb45cf40771e.tar.xz |
misc: add linked list helpers
This provides macros for managing intrusive doubly linked lists.
There are many ways how to do those in a "generic" way in C. For example
Solaris style lists are pretty nice:
https://github.com/illumos/illumos-gate/blob/master/usr/src/uts/common/sys/list.h
https://github.com/illumos/illumos-gate/blob/master/usr/src/common/list/list.c
I even have an independent implementation of this, which could be ISC
licensed. But I think it's easier to vomit ~100 lines of preprocessor
garbage, which has a lower footprint, and I think it wins slightly on
the side of type safety, simplicity, and ease of use, even if it doesn't
look as magically nice.
Diffstat (limited to 'player')
0 files changed, 0 insertions, 0 deletions