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

z_string_wrap and z_slice_wrap are not symmetrical #475

Closed
milyin opened this issue Jun 24, 2024 · 1 comment
Closed

z_string_wrap and z_slice_wrap are not symmetrical #475

milyin opened this issue Jun 24, 2024 · 1 comment
Labels
api fix Problem in the API release Part of the next release

Comments

@milyin
Copy link
Contributor

milyin commented Jun 24, 2024

Describe the release item

The z_slice_wrap accepts (ptr,len). The matching function for string is z_string_from_substring which also takes (str,len). And function with similar name z_string_wrap accepts only (str). It's more logical to have both "wrap" functions use the same parameters.

Maybe better to review these names and avoid this ambigious word "wrap". It doesn't give any information that the funciton actually copies data from buffer. The only hint is the resulting type - "owned" - but this is not enough

@Mallets
Copy link
Member

Mallets commented Jul 26, 2024

Superseded by #548

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api fix Problem in the API release Part of the next release
Projects
Status: Done
Development

No branches or pull requests

2 participants