Skip to content
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

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

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 added a commit that referenced this pull request Aug 11, 2024
Curl_llist_head() return the first node in a linked list.

Curl_list_elem() returns the data associated with a linked list node.

Curl_list_next() returns the next node entry in the list.

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

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

Closes #14485
bagder added a commit that referenced this pull request Aug 11, 2024
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.

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

Closes #14485
bagder added a commit that referenced this pull request Aug 11, 2024
- 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 added a commit that referenced this pull request Aug 11, 2024
- 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
- 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
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