]> git.ipfire.org Git - thirdparty/curl.git/commit
llist: remove direct struct accesses, use only functions
authorDaniel Stenberg <daniel@haxx.se>
Sat, 10 Aug 2024 21:27:25 +0000 (23:27 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 12 Aug 2024 11:18:10 +0000 (13:18 +0200)
commitba235ab269080dc66e35835c829f7ac4290dbc1d
tree1a281d0ff981e8533ddf597b4f25096eeb95a015
parent6f00a05e896be6f14eb11e74818ee393a245f4bc
llist: remove direct struct accesses, use only functions

- Turned them all into functions to also do asserts etc.

- The llist related structs got all their fields renamed in order to make
  sure no existing code remains using direct access.

- Each list node struct now points back to the list it "lives in", so
  Curl_node_remove() no longer needs the list pointer.

- Rename the node struct and some of the access functions.

- Added lots of ASSERTs to verify API being used correctly

- Fix some cases of API misuse

Add docs/LLIST.md documenting the internal linked list API.

Closes #14485
27 files changed:
docs/LLIST.md [new file with mode: 0644]
docs/Makefile.am
lib/altsvc.c
lib/altsvc.h
lib/conncache.c
lib/easy.c
lib/fileinfo.h
lib/ftp.c
lib/hash.c
lib/hash.h
lib/headers.c
lib/headers.h
lib/hsts.c
lib/hsts.h
lib/http.c
lib/llist.c
lib/llist.h
lib/multi.c
lib/multihandle.h
lib/url.c
lib/urldata.h
lib/vquic/curl_ngtcp2.c
lib/vquic/curl_osslq.c
lib/vquic/curl_quiche.c
tests/unit/unit1300.c
tests/unit/unit1654.c
tests/unit/unit1660.c