]> git.corax.cc Git - mwm/commit
loop: Add convenience functions and a foreach function without data
authorMatthias Kruk <m@m10k.eu>
Tue, 18 May 2021 23:03:51 +0000 (08:03 +0900)
committerMatthias Kruk <m@m10k.eu>
Tue, 18 May 2021 23:03:51 +0000 (08:03 +0900)
commit9c8a163e1a45c42cd6d2fa62affa66d4c969c541
treecf33e071d80c06e12f2c188e9617767259fc8d0d
parentbbd4472b4dcba613711460044e678847d6aaa99a
loop: Add convenience functions and a foreach function without data

This commit adds convenience functions to the loop data type that
allow the caller to find the elements that come before or after an
element in a loop.
This further adds functions to shift the position of an element in
the loop to the back or the front, and a foreach function that
passes only the element pointer to the callback (this is useful for
calling things like free() from the foreach function).
loop.c
loop.h