Add ns_string! macro#207
Merged
Merged
Conversation
d8da2e8 to
c80444b
Compare
0660da0 to
bfd9989
Compare
Implementation history can be primarily found in the following three commits: - nvzqz/fruity@0516282 - nvzqz/fruity@3fbc455 - nvzqz/fruity@868fd65 All credit goes to the following people: Co-authored-by: Nikolai Vazquez <hello@nikolaivazquez.com> Co-authored-by: Thom Chiovoloni <chiovolonit@gmail.com> Co-authored-by: rodrimati1992 <rodrimatt1985@gmail.com>
If the user needs the string to end with e.g. two NUL, we really shouldn't stop them. `fruity` probably did this originally because their NSString truncated at null bytes, see nvzqz/fruity#14
Panics are now possible in `const fn`
I'm unsure if this is really true; the compile-time cost of using this is potentially quite high, since we have to make the compiler convert UTF-8 to UTF-16!
GNUStep support is definitely possible, just hasn't been implemented yet
5c7faf1 to
cf86b54
Compare
This means we have to remove support for putting string references in statics for now at least
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #53.
Add
ns_string!macro to createNSStrings at compile-time. This is an improved version offruity::ns_string!, credit can be found in first commit.TODO:
_unnamed_cfstring_in the symbol for the CFString will improve debuggability see thisexpr @"some string"inlldb.GNUStep implementationPostponed, I've added a caching impl instead.dyld,lldb,lldandld64, fairly certain it isn't.sel!feature)