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

[backport:1.4] JS cstring null fixes #16979

Merged
merged 3 commits into from
Feb 11, 2021
Merged

Conversation

metagn
Copy link
Collaborator

@metagn metagn commented Feb 9, 2021

Fixes #16674, fixes #16686

I special cased cstring for AppendStrStr here because it's not disruptive, but add(var cstring, cstring) could just be emitted/asm'd and not use a magic, or it could as well just not exist since it wasn't documented before and it's very easy to wrap += yourself. This is good enough now though.

Also fixed move turning strings null.

@metagn metagn marked this pull request as draft February 9, 2021 15:24
@metagn metagn marked this pull request as ready for review February 9, 2021 15:42
@metagn
Copy link
Collaborator Author

metagn commented Feb 10, 2021

The reason this is set to be backported to 1.4 is because #14158, the PR that removed null seqs/strings (move change) and regressed behavior for cstrings (fixed in this PR), was merged in 1.3.

@metagn
Copy link
Collaborator Author

metagn commented Feb 11, 2021

Does this conflict with the 1.4.4 release candidate? Having nil cstrings without noticing are pretty common in JS, and strings being null can be a hard problem to pin down where it's coming from. Having this in the latest stable release would be nice.

@Araq Araq merged commit 81533a0 into nim-lang:devel Feb 11, 2021
@Araq
Copy link
Member

Araq commented Feb 11, 2021

@hlaaftana The release is scheduled for next week and this commit is likely to make it into 1.4.4. Ping @narimiran

narimiran pushed a commit that referenced this pull request Feb 17, 2021
* [backport:1.4] JS cstring null fixes
* fix JS move string
* make it look cleaner

(cherry picked from commit 81533a0)
ardek66 pushed a commit to ardek66/Nim that referenced this pull request Mar 26, 2021
* [backport:1.4] JS cstring null fixes
* fix JS move string
* make it look cleaner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants