projects
/
m6w6
/
ext-http
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
| inline |
side by side
(parent:
5560fdd
)
partially replace the loop with a duff device
author
Michael Wallner
<mike@php.net>
Fri, 13 Feb 2015 10:21:06 +0000
(11:21 +0100)
committer
Michael Wallner
<mike@php.net>
Fri, 13 Feb 2015 10:21:06 +0000
(11:21 +0100)
php_http_utf8.h
patch
|
blob
|
history
diff --git
a/php_http_utf8.h
b/php_http_utf8.h
index c7bcb49428c53a79234593390c3705d9ca791af5..d67910fb82aff5453541f01fe0b8d30e4a8e1db1 100644
(file)
--- a/
php_http_utf8.h
+++ b/
php_http_utf8.h
@@
-595,9
+595,9
@@
static inline size_t utf8towc(unsigned *wc, const unsigned char *uc, size_t len)
static inline zend_bool isualpha(unsigned ch)
{
- unsigned i, j;
+ unsigned i
= 0
, j;
- for (i = 0; i < sizeof(utf8_ranges)/sizeof(utf8_range_t); ++i) {
+ PHP_HTTP_DUFF(sizeof(utf8_ranges)/sizeof(utf8_range_t),
if (utf8_ranges[i].start == ch) {
return 1;
} else if (utf8_ranges[i].start <= ch && utf8_ranges[i].end >= ch) {
@@
-611,7
+611,8
@@
static inline zend_bool isualpha(unsigned ch)
}
return 0;
}
- }
+ ++i;
+ );
return 0;
}