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

C API: document nix_state_create() needs a corresponding nix_state_free() #10672

Open
Radvendii opened this issue May 9, 2024 · 0 comments
Open
Assignees
Labels
c api Nix as a C library with a stable interface documentation feature Feature request or proposal

Comments

@Radvendii
Copy link
Contributor

Is your feature request related to a problem? Please describe.

The C API docs tend to say how the user needs to properly dispose of the values returned. e.g. nix_c_context_create() says "Owned by caller. Free using nix_c_context_free()"

nix_state_create() has a similar property where it's owned by the caller and needs a nix_state_free() call, but this isn't documented.

Describe the solution you'd like
Document the usage of nix_state_create()/nix_state_free() in the same way as nix_c_context_create()/nix_c_context_free()

Describe alternatives you've considered
The documentation already has a link to the nix_state_free() function, which is sort of clear enough, but for instance it doesn't show up in the rust documentation when you generate c bindings. Regardless, the documentation should be consistent between different functions.

Priorities

Add 👍 to issues you find important.

@Radvendii Radvendii added feature Feature request or proposal c api Nix as a C library with a stable interface labels May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c api Nix as a C library with a stable interface documentation feature Feature request or proposal
Projects
None yet
Development

No branches or pull requests

3 participants