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

Introduce CArray.of_string and expand the string view documentation #562

Merged
merged 3 commits into from
Apr 5, 2018
Merged

Introduce CArray.of_string and expand the string view documentation #562

merged 3 commits into from
Apr 5, 2018

Conversation

mseri
Copy link
Contributor

@mseri mseri commented Apr 3, 2018

I have already expanded a bit the comments on the FAQ. Feel free to close this PR if you think it's superfluous, but I thought that passing strings in C structure fields and similar type of bindings are probably not that uncommon, and it may be useful to be hinted that string views are not the right thing both by the documentation and by the presence of a function like CArray.of_string.

Marcello Seri added 3 commits April 3, 2018 16:49
Having a function to make an ocaml string into a managed CArray
to pass to the c bindings could make it clearer that string
views are not always the best ways to deal with strings when
interfacing with C

Signed-off-by: Marcello Seri <[email protected]>
Signed-off-by: Marcello Seri <[email protected]>
@mseri
Copy link
Contributor Author

mseri commented Apr 3, 2018

The android build failure seems to be independent of this PR

@yallop
Copy link
Owner

yallop commented Apr 5, 2018

Thank you for the contribution, @mseri! I think this is a useful addition.

@yallop yallop merged commit db21a8c into yallop:master Apr 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants