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

Feat: stdlib: adds system.string.setLenUninit #24836

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from

Conversation

ZoomRmc
Copy link
Contributor

@ZoomRmc ZoomRmc commented Apr 2, 2025

Adds system.setLenUninit for the string type. Allows setting length without initializing new memory on growth.

  • sysstr housekeeping:
    • Removed redundant len and reserved sets already performed by prior rawNewStringNoInitcalls.

- Required for a followup to nim-lang#15951
- Accompanies nim-lang#19727 but for strings

+ `sysstr` housekeeping:
  - Removed redundant `len` and `reserved` sets already
     performed by prior `rawNewStringNoInit`calls.
@ZoomRmc
Copy link
Contributor Author

ZoomRmc commented Apr 3, 2025

systr.setLengthStrUninit fails with mm:refc on Linux.
Seems my naïve approach is wrong.
Can this be made to work without introducing new compiler procs?

@arnetheduck
Copy link
Contributor

arnetheduck commented Apr 3, 2025

the same for seq would be nice, ie strings are pretty niche at the end of the day.
never mind, forgot that it was already fixed :)

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