]> granicus.if.org Git - php/commitdiff
Remove some uses of zend_inline_hash_func
authorNikita Popov <nikita.ppv@gmail.com>
Fri, 15 May 2020 08:13:38 +0000 (10:13 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Fri, 15 May 2020 08:14:22 +0000 (10:14 +0200)
There's no need to force-inline the hashing for all of these.

ext/oci8/oci8.c
ext/standard/html.c
sapi/phpdbg/phpdbg_bp.c
sapi/phpdbg/phpdbg_cmd.c

index b25a50dcb8914eb986733ac53b545785900ba76f..dc506355f2a1cc931b7672136e8895886af37e26 100644 (file)
@@ -1754,7 +1754,7 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char
 
        if (password_len) {
                zend_ulong password_hash;
-               password_hash = zend_inline_hash_func(password, password_len);
+               password_hash = zend_hash_func(password, password_len);
                smart_str_append_unsigned_ex(&hashed_details, password_hash, 0);
        }
        smart_str_appendl_ex(&hashed_details, "**", sizeof("**") - 1, 0);
@@ -2909,7 +2909,7 @@ static php_oci_spool *php_oci_get_spool(char *username, int username_len, char *
        smart_str_appendl_ex(&spool_hashed_details, "**", sizeof("**") - 1, 0);
        if (password_len) {
                zend_ulong password_hash;
-               password_hash = zend_inline_hash_func(password, password_len);
+               password_hash = zend_hash_func(password, password_len);
                smart_str_append_unsigned_ex(&spool_hashed_details, password_hash, 0);
        }
        smart_str_appendl_ex(&spool_hashed_details, "**", sizeof("**") - 1, 0);
index a17ed3821d69c88552d802f5d1b823c3bb323f65..e1a0799375cb4eb8da5a375c982a7aab634def68 100644 (file)
@@ -738,7 +738,7 @@ static inline int process_named_entity_html(const char **buf, const char **start
 /* }}} */
 
 /* {{{ resolve_named_entity_html */
-static inline int resolve_named_entity_html(const char *start, size_t length, const entity_ht *ht, unsigned *uni_cp1, unsigned *uni_cp2)
+static int resolve_named_entity_html(const char *start, size_t length, const entity_ht *ht, unsigned *uni_cp1, unsigned *uni_cp2)
 {
        const entity_cp_map *s;
        zend_ulong hash = zend_inline_hash_func(start, length);
index e6b7c10225163ec2a7d1da0c2120f7187b1c8660..a29d4442fbcf8fa72a7c5d8ace322a2cae0f4c8b 100644 (file)
@@ -906,7 +906,7 @@ static inline void phpdbg_create_conditional_break(phpdbg_breakcond_t *brake, co
 
 PHPDBG_API void phpdbg_set_breakpoint_expression(const char *expr, size_t expr_len) /* {{{ */
 {
-       zend_ulong expr_hash = zend_inline_hash_func(expr, expr_len);
+       zend_ulong expr_hash = zend_hash_func(expr, expr_len);
        phpdbg_breakcond_t new_break;
 
        if (!zend_hash_index_exists(&PHPDBG_G(bp)[PHPDBG_BREAK_COND], expr_hash)) {
@@ -925,7 +925,7 @@ PHPDBG_API void phpdbg_set_breakpoint_at(const phpdbg_param_t *param) /* {{{ */
 
        if (param->next) {
                condition = param->next;
-               hash = zend_inline_hash_func(condition->str, condition->len);
+               hash = zend_hash_func(condition->str, condition->len);
 
                if (!zend_hash_index_exists(&PHPDBG_G(bp)[PHPDBG_BREAK_COND], hash)) {
                        phpdbg_create_conditional_break(&new_break, param, condition->str, condition->len, hash);
index b7578e3a86961356b7ed42d03d18758fd3dcf3b0..750628c80071960afbdda428ad28bcdce8b5ffe6 100644 (file)
@@ -199,16 +199,16 @@ PHPDBG_API zend_ulong phpdbg_hash_param(const phpdbg_param_t *param) /* {{{ */
                break;
 
                case STR_PARAM:
-                       hash += zend_inline_hash_func(param->str, param->len);
+                       hash += zend_hash_func(param->str, param->len);
                break;
 
                case METHOD_PARAM:
-                       hash += zend_inline_hash_func(param->method.class, strlen(param->method.class));
-                       hash += zend_inline_hash_func(param->method.name, strlen(param->method.name));
+                       hash += zend_hash_func(param->method.class, strlen(param->method.class));
+                       hash += zend_hash_func(param->method.name, strlen(param->method.name));
                break;
 
                case FILE_PARAM:
-                       hash += zend_inline_hash_func(param->file.name, strlen(param->file.name));
+                       hash += zend_hash_func(param->file.name, strlen(param->file.name));
                        hash += param->file.line;
                        if (param->num)
                                hash += param->num;
@@ -223,13 +223,13 @@ PHPDBG_API zend_ulong phpdbg_hash_param(const phpdbg_param_t *param) /* {{{ */
                break;
 
                case NUMERIC_FUNCTION_PARAM:
-                       hash += zend_inline_hash_func(param->str, param->len);
+                       hash += zend_hash_func(param->str, param->len);
                        hash += param->num;
                break;
 
                case NUMERIC_METHOD_PARAM:
-                       hash += zend_inline_hash_func(param->method.class, strlen(param->method.class));
-                       hash += zend_inline_hash_func(param->method.name, strlen(param->method.name));
+                       hash += zend_hash_func(param->method.class, strlen(param->method.class));
+                       hash += zend_hash_func(param->method.name, strlen(param->method.name));
                        if (param->num)
                                hash+= param->num;
                break;