com php-src: restore the old part of ezmlm_hash(): ex t/standard/mail.c
| From: | Anatol Belski | Date: | Wed, 27 Aug 2014 21:14:54 +0000 |
| Subject: | com php-src: restore the old part of ezmlm_hash(): ex t/standard/mail.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-81228@lists.php.net to get a copy of this message | ||
Commit: e6dcd19aed8c45ca38c90c5f019043f422064ac0
Author: Anatol Belski <ab@php.net> Wed, 27 Aug 2014 23:14:54 +0200
Parents: 0e41927ca091fa0e421c5fa8734f219343c2ae34
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e6dcd19aed8c45ca38c90c5f019043f422064ac0
Log:
restore the old part of ezmlm_hash()
Changed paths:
M ext/standard/mail.c
Diff:
diff --git a/ext/standard/mail.c b/ext/standard/mail.c
index 4efbb77..3404ebe 100644
--- a/ext/standard/mail.c
+++ b/ext/standard/mail.c
@@ -79,7 +79,7 @@ extern zend_long php_getuid(TSRMLS_D);
PHP_FUNCTION(ezmlm_hash)
{
char *str = NULL;
- zend_ulong h = Z_UL(5381);
+ unsigned int h = 5381;
size_t j, str_len;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &str, &str_len) ==
FAILURE) {
@@ -87,10 +87,10 @@ PHP_FUNCTION(ezmlm_hash)
}
for (j = 0; j < str_len; j++) {
- h = (h + (h << Z_UL(5))) ^ (zend_ulong) (unsigned char) tolower(str[j]);
+ h = (h + (h << 5)) ^ (zend_ulong) (unsigned char) tolower(str[j]);
}
- h = (h % Z_UL(53));
+ h = (h % 53);
RETURN_LONG((zend_long) h);
}