Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mask mode: Fix incorrect use to CTYPE macros, so ?W will case-
toggle according to our active encoding - not just ASCII. Closes #1847, as other uses of ctype macros was audited too and no other needed fixing.
- Loading branch information
1 parent
39f6259
commit 416bede
Showing
3 changed files
with
27 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
416bede
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Performance actually got better too 😎
416bede
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is how the old-school ctype macros were written. they are MUCH faster than the new crap, but only worked for one CP (ASCII at the time).
Are there other places where we need to convert from C ctype.h usages to enc_*() macros ?
416bede
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The others I found are fine, they just handle things like command line options. No wait, dyna compiler had some... I thought they were for things like MD5 -> md5 but come to think of it: In case they are for things like
lc($p)
we should really use the enc_tolower stuff (btw we have other functions that do a whole string in one call).