Skip to content

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

Open
@Radvendii

Description

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.

Metadata

Assignees

Labels

c apiNix as a C library with a stable interfacedocumentationfeatureFeature request or proposal

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions