Skip to content

fix improper integer type on systems with non-32-bit int #289

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mrpapersonic
Copy link

generally the parameter here should be utf8proc_int32_t anyway, but changing public facing APIs for something like this isn't a very good idea. maybe this should be changed for the next major bump in the libtool version

@stevengj
Copy link
Member

seqindex_write_char_decomposed is not part of the API, so we can just change the parameter.

@mrpapersonic
Copy link
Author

utf8proc_decompose_char (the function this patch edits) is though. the most sensible change would be to edit last_boundclass to be 32-bit, but that breaks ABI, though I suppose it doesn't matter for the 0.0001% of systems that actually deal with 16-bit or 64-bit int.

@stevengj
Copy link
Member

stevengj commented Jul 16, 2025

I think we can just change the utf8proc_decompose_char API to declare it as int32. ILP64 systems are vanishingly rare these days, and 16-bit is probably mainly embedded systems where I doubt people are using utf8proc as a shared library.

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