You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a project for which I will eventually (probably) want to provide C bindings. It would be enormously convenient if there was a variant of (or feature flag for) the string interner backend which left an extra null-termination byte at the end of every interned string, such that the str_from_interner.as_ptr() could be used from C without first copying the whole string to a new CString.
Is this possible, or am I missing some details which might make this unsafe to do?
The text was updated successfully, but these errors were encountered:
That's a decent request and it may make sense to adjust the string_interner crate in order to support this use case.
It is more a question about a proper API design for this issue.
Is there a specific API that you'd like to see as a string_interner user?
I have a project for which I will eventually (probably) want to provide C bindings. It would be enormously convenient if there was a variant of (or feature flag for) the string interner backend which left an extra null-termination byte at the end of every interned string, such that the
str_from_interner.as_ptr()
could be used from C without first copying the whole string to a newCString
.Is this possible, or am I missing some details which might make this unsafe to do?
The text was updated successfully, but these errors were encountered: