Skip to content

llist: remove direct struct accesses, use access functions #14485

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from

Conversation

bagder
Copy link
Member

@bagder bagder commented Aug 10, 2024

  • Renamed a struct and some functions.
  • Turned macros into functions.
  • The llist related structs got all their fields renamed in order to make sure no existing code remains using direct access.
  • Added numerous asserts to detect API mistakes (and fixed a few such mistakes)
  • Fixed a few API misuses

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

@bagder bagder added the tidy-up label Aug 10, 2024
@github-actions github-actions bot added the tests label Aug 10, 2024
@bagder bagder force-pushed the bagder/llist-abstract branch from 7d78a79 to 6062c4e Compare August 11, 2024 09:04
@bagder bagder force-pushed the bagder/llist-abstract branch from 6062c4e to eb69dba Compare August 11, 2024 09:30
@bagder bagder force-pushed the bagder/llist-abstract branch from a594a4c to ff8845d Compare August 11, 2024 21:25
@bagder bagder force-pushed the bagder/llist-abstract branch from 4347fdc to 1b5ae06 Compare August 11, 2024 22:27
- 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.

- 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
@bagder bagder force-pushed the bagder/llist-abstract branch from e139014 to b8a42a1 Compare August 12, 2024 08:04
bagder added 3 commits August 12, 2024 10:28
Store a pointer to the list in each node
Since it now operates with node input argument only
Introduce Curl_node_uremove() for passing in a non-NULL user pointer
@bagder
Copy link
Member Author

bagder commented Aug 12, 2024

I consider myself fairly done with this PR now and aim at merging this once the CI jobs are green.

@bagder bagder closed this in ba235ab Aug 12, 2024
@bagder bagder deleted the bagder/llist-abstract branch August 12, 2024 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

1 participant