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

Add missing methods for one- and two-byte strings. #704

Merged
merged 7 commits into from
Jun 22, 2021

Conversation

andreubotella
Copy link
Contributor

Fixes #703.

@CLAassistant
Copy link

CLAassistant commented Jun 17, 2021

CLA assistant check
All committers have signed the CLA.

@andreubotella
Copy link
Contributor Author

The Windows build is failing with a STATUS_ACCESS_VIOLATION error, but I can't reproduce on a local Windows 10 machine. It doesn't seem like I can rerun the workflow manually, so I'll push an empty commit instead to see if it was a fluke.

Copy link
Contributor

@bnoordhuis bnoordhuis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks. I'll fix up the style suggestions.

src/string.rs Outdated Show resolved Hide resolved
src/string.rs Outdated
sd.get_isolate_ptr(),
buffer.as_ptr(),
new_type,
buffer.len() as int,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realize you copied this from new_from_one_byte() but a good follow-up change would be to turn the cast into a fallible operation, in case someone passes in a buffer > 2^31.

src/binding.cc Outdated Show resolved Hide resolved
src/binding.cc Outdated Show resolved Hide resolved
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.

Support missing methods for working with one- and two-byte strings
3 participants