Skip to content

C: Use uint32_t in utf8.c#777

Merged
marcoroth merged 1 commit intomarcoroth:mainfrom
timkaechele:utf8-uint32
Nov 4, 2025
Merged

C: Use uint32_t in utf8.c#777
marcoroth merged 1 commit intomarcoroth:mainfrom
timkaechele:utf8-uint32

Conversation

@timkaechele
Copy link
Contributor

This PR makes all utf8 apis use uint32_t instead of the more generic int

Copy link
Owner

@marcoroth marcoroth left a comment

Choose a reason for hiding this comment

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

I guess if we tighten up the return types, does it make sense to treat them as uint8_t?

@timkaechele
Copy link
Contributor Author

timkaechele commented Nov 4, 2025

I guess if we tighten up the return types, does it make sense to treat them as uint8_t?

I think we won’t gain much in terms of performance.

Using uint32_t for all string lengths may be just a bit more straightforward

@marcoroth marcoroth changed the title C: Use explicit int size in utf8 apis C: Use uint32_t in utf8.c Nov 4, 2025
Copy link
Owner

@marcoroth marcoroth left a comment

Choose a reason for hiding this comment

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

Fair enough, thank you!

@marcoroth marcoroth merged commit b13a6a9 into marcoroth:main Nov 4, 2025
17 checks passed
@timkaechele timkaechele deleted the utf8-uint32 branch November 4, 2025 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants