[webkit-reviews] review granted: [Bug 15519] eliminate use of <ctype.h> for processing ASCII : [Attachment 16683] patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 16 11:28:56 PDT 2007


Maciej Stachowiak <mjs at apple.com> has granted Darin Adler <darin at apple.com>'s
request for review:
Bug 15519: eliminate use of <ctype.h> for processing ASCII
http://bugs.webkit.org/show_bug.cgi?id=15519

Attachment 16683: patch
http://bugs.webkit.org/attachment.cgi?id=16683&action=edit

------- Additional Comments from Maciej Stachowiak <mjs at apple.com>
Would it be reasonable to make these template functions instead of overloads:

+inline bool isASCIIAlpha(char c) { return (c | 0x20) >= 'a' && (c | 0x20) <=
'z'; }
+inline bool isASCIIAlpha(unsigned short c) { return (c | 0x20) >= 'a' && (c |
0x20) <= 'z'; }
+inline bool isASCIIAlpha(wchar_t c) { return (c | 0x20) >= 'a' && (c | 0x20)
<= 'z'; }

Perhaps DisallowCType.h or ASCIICType.h should have a comment explaining why
ASCIICType functions are preferred to regular ctype functions.

r=me anyway but please consider these suggestions.


More information about the webkit-reviews mailing list