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
Currently, in the runtime and declare modules, the API takes &str for ease of use. However, this requires copying the string into a buffer and adding a nul terminator byte. It might be desirable for some cases to have a way to pass in strings which are already known to be nul-terminated so that this allocation can be avoided.
The text was updated successfully, but these errors were encountered:
Exploring some options here and created the nul crate.
Currently conflicted on whether that's the best solution. I'm realizing that really, the only strings that need to be provided are names (of classes, ivars, methods, etc). We could make an even nicer macro for generating those because they're idents. Maybe something like name!(NSObject) instead of ntstr!("NSObject"). At that point, is a separate crate even worth it? Or should we just have an objc::Name struct for encapsulating this.
Currently, in the runtime and declare modules, the API takes
&str
for ease of use. However, this requires copying the string into a buffer and adding a nul terminator byte. It might be desirable for some cases to have a way to pass in strings which are already known to be nul-terminated so that this allocation can be avoided.The text was updated successfully, but these errors were encountered: