From e6dcd19aed8c45ca38c90c5f019043f422064ac0 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Wed, 27 Aug 2014 23:14:54 +0200 Subject: [PATCH] restore the old part of ezmlm_hash() --- ext/standard/mail.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/standard/mail.c b/ext/standard/mail.c index 4efbb77877..3404ebe2ac 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); } -- 2.50.1