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

Narrow MASKS and UTF8Byte.value's type, assign MASKS by left shift in UTF32ToUTF8 #13310

Merged
merged 5 commits into from Apr 23, 2024

Conversation

vsop-479
Copy link
Contributor

@vsop-479 vsop-479 commented Apr 16, 2024

Description

Change MASKS from int[] to byte[], and assign it with left shift in UTF32ToUTF8.

Edit:
This change also implemented:
Only set first byte value for tmp UTF8.
Change UTF8Byte.value type from int to byte.

@vsop-479
Copy link
Contributor Author

@mikemccand
Please take a look when you get a chance.

@vsop-479 vsop-479 changed the title Change MASKS from int[] to byte[], and assign it with left shift in UTF32ToUTF8 Narrow MASKS and UTF8Byte.value's type, assign MASKS with left shift in UTF32ToUTF8 Apr 18, 2024
@vsop-479 vsop-479 changed the title Narrow MASKS and UTF8Byte.value's type, assign MASKS with left shift in UTF32ToUTF8 Narrow MASKS and UTF8Byte.value's type, assign MASKS by left shift in UTF32ToUTF8 Apr 18, 2024
Copy link
Member

@mikemccand mikemccand left a comment

Choose a reason for hiding this comment

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

Thanks @vsop-479 -- nice to see another TODO done! Silly that this code was using int to represent what is really only a byte.

@mikemccand mikemccand merged commit fb12e09 into apache:main Apr 23, 2024
3 checks passed
mikemccand pushed a commit that referenced this pull request Apr 23, 2024
… UTF32ToUTF8 (#13310)

* Change MASKS from int[] to byte[], and assign it with left shift.

* Only set first byte for tmpUTF8.

* Only set first byte value for tmp utf8.

* Change value type from int to byte.

* Remove stale comment.
@mikemccand mikemccand added this to the 9.11.0 milestone Apr 23, 2024
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.

None yet

2 participants