Skip to content

Conversation

@zherczeg
Copy link
Collaborator

@zherczeg zherczeg commented Dec 7, 2024

This is just one line change, but I want to make sure it does not break anything.

Also fix range computation when xclass is NOT in eclass.
@NWilson
Copy link
Member

NWilson commented Dec 7, 2024

I don't understand the implications of this. Did it affect the 32-bit library?

@zherczeg
Copy link
Collaborator Author

zherczeg commented Dec 7, 2024

No. It was wrongly defined (probably to fit to an int), but it was harmless since there is no optimization for characters > 0x7fffffff. However it is better this way.

{
#if defined SUPPORT_UNICODE && (PCRE2_CODE_UNIT_WIDTH == 8 || PCRE2_CODE_UNIT_WIDTH == 16)
if (common->utf && compares == 0 && (status & XCLASS_IS_ECLASS))
if (common->utf && compares == 0 && !(status & XCLASS_IS_ECLASS))
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It was a typo. Luckily, it has no other effect than a deoptimization (xclass case is not optimized, the eclass case always ignored the computed value). Fortunately I noticed it.

@zherczeg zherczeg merged commit 44d1e46 into PCRE2Project:master Dec 7, 2024
21 checks passed
@zherczeg zherczeg deleted the max_char branch December 7, 2024 19:23
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