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

Do not use SETLENGTH #214

Merged
merged 10 commits into from
Apr 26, 2024
Merged

Do not use SETLENGTH #214

merged 10 commits into from
Apr 26, 2024

Conversation

yutannihilation
Copy link
Owner

Close #209.

cf. https://fosstodon.org/@shikokuchuo/112325582047868252

But, the implementation is not efficient. Probably manual Rf_allocVector() + memcpy should faster. Or, maybe I can just collect() into a Vec first?

https://github.com/r-devel/r-svn/blob/faa2ca57cc03c26c49a5de39db980268c6c4cc67/src/main/builtin.c#L832C6-L832C17

Anyway, let's think about it later. I'd like to get rid of the CI error for now.

@yutannihilation
Copy link
Owner Author

Current status: this implementation is not correct about unprotecting the old one and protecting the new one.

@yutannihilation yutannihilation changed the title Replace SETLENGTH with Rf_xlengthgets Do not use SETLENGTH Apr 26, 2024
@yutannihilation yutannihilation merged commit 5b72c9b into main Apr 26, 2024
@yutannihilation yutannihilation deleted the SETLENGTH branch April 26, 2024 00:47
@yutannihilation
Copy link
Owner Author

I'm not sure I like this implementation, but let's go ahead and revisit here when it's necessary.

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.

SETLENGTH is "non-API"
1 participant