Skip to content

Conversation

@stevengj
Copy link
Contributor

@stevengj stevengj commented Dec 23, 2024

The string-conversion routines made an unnecessary deepcopy of the result of unsafe_string, which is already documented to be a copy.

Also should be no need for the pointer call, since unsafe_string already has a Cstring method.

(The trimzeros function also does a lot of unnecessary copying, but fixing this is more work. Ideally you would do the trimming at the same time as copying from the Cstring pointer.)

@JeffreySarnoff JeffreySarnoff merged commit 71b8108 into JeffreySarnoff:main Dec 25, 2024
7 of 8 checks passed
@JeffreySarnoff
Copy link
Owner

thank you

@stevengj stevengj deleted the patch-1 branch December 26, 2024 14:45
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