1
0
Fork 0
knot-resolver/lib/generic
Daniel Baumann fbc604e215
Adding upstream version 5.7.5.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-21 13:56:17 +02:00
..
array.h Adding upstream version 5.7.5. 2025-06-21 13:56:17 +02:00
lru.c Adding upstream version 5.7.5. 2025-06-21 13:56:17 +02:00
lru.h Adding upstream version 5.7.5. 2025-06-21 13:56:17 +02:00
pack.h Adding upstream version 5.7.5. 2025-06-21 13:56:17 +02:00
queue.c Adding upstream version 5.7.5. 2025-06-21 13:56:17 +02:00
queue.h Adding upstream version 5.7.5. 2025-06-21 13:56:17 +02:00
README.rst Adding upstream version 5.7.5. 2025-06-21 13:56:17 +02:00
test_array.c Adding upstream version 5.7.5. 2025-06-21 13:56:17 +02:00
test_lru.c Adding upstream version 5.7.5. 2025-06-21 13:56:17 +02:00
test_pack.c Adding upstream version 5.7.5. 2025-06-21 13:56:17 +02:00
test_queue.c Adding upstream version 5.7.5. 2025-06-21 13:56:17 +02:00
test_trie.c Adding upstream version 5.7.5. 2025-06-21 13:56:17 +02:00
trie.c Adding upstream version 5.7.5. 2025-06-21 13:56:17 +02:00
trie.h Adding upstream version 5.7.5. 2025-06-21 13:56:17 +02:00
trie.spdx Adding upstream version 5.7.5. 2025-06-21 13:56:17 +02:00

.. SPDX-License-Identifier: GPL-3.0-or-later

Generics library
----------------

This small collection of "generics" was born out of frustration that I couldn't find no
such thing for C. It's either bloated, has poor interface, null-checking is absent or
doesn't allow custom allocation scheme. BSD-licensed (or compatible) code is allowed here,
as long as it comes with a test case in `tests/test_generics.c`.

* array_ - a set of simple macros to make working with dynamic arrays easier.
* queue_ - a FIFO + LIFO queue.
* pack_ - length-prefixed list of objects (i.e. array-list).
* lru_ - LRU-like hash table
* trie_ - a trie-based key-value map, taken from knot-dns

array
~~~~~

.. doxygenfile:: array.h
   :project: libkres

queue
~~~~~

.. doxygenfile:: queue.h
   :project: libkres

pack
~~~~

.. doxygenfile:: pack.h
   :project: libkres

lru
~~~

.. doxygenfile:: lru.h
   :project: libkres

trie
~~~~

.. doxygenfile:: trie.h
   :project: libkres


.. _`Crit-bit tree`: https://cr.yp.to/critbit.html