]> granicus.if.org Git - php/commitdiff
Drop unnecessary HASH_OF uses in ext/oci8
authorNikita Popov <nikita.ppv@gmail.com>
Thu, 11 Oct 2018 10:33:26 +0000 (12:33 +0200)
committerChristopher Jones <christopher.jones@oracle.com>
Fri, 7 Dec 2018 12:21:32 +0000 (23:21 +1100)
These only operate on arrays.

ext/oci8/oci8_statement.c

index d80bb5f1d7266233e1580abc749d19693df7e550..4ad75cd169f04016d5dc455653ff795371bed35e 100644 (file)
@@ -1002,7 +1002,7 @@ int php_oci_bind_post_exec(zval *data)
                HashTable *hash;
 
                SEPARATE_ARRAY(zv);
-               hash = HASH_OF(zv);
+               hash = Z_ARRVAL_P(zv);
                zend_hash_internal_pointer_reset(hash);
 
                switch (bind->array.type) {
@@ -1727,7 +1727,7 @@ php_oci_bind *php_oci_bind_array_helper_string(zval *var, zend_long max_table_le
        zval *entry;
 
        SEPARATE_ARRAY(var); /* TODO: may be use new HashTable iteration and prevent inplace modification */
-       hash = HASH_OF(var);
+       hash = Z_ARRVAL_P(var);
 
        if (maxlength == -1) {
                zend_hash_internal_pointer_reset(hash);
@@ -1801,7 +1801,7 @@ php_oci_bind *php_oci_bind_array_helper_number(zval *var, zend_long max_table_le
        zval *entry;
 
        SEPARATE_ARRAY(var); /* TODO: may be use new HashTable iteration and prevent inplace modification */
-       hash = HASH_OF(var);
+       hash = Z_ARRVAL_P(var);
 
        bind = emalloc(sizeof(php_oci_bind));
        ZVAL_UNDEF(&bind->val);
@@ -1842,7 +1842,7 @@ php_oci_bind *php_oci_bind_array_helper_double(zval *var, zend_long max_table_le
        zval *entry;
 
        SEPARATE_ARRAY(var); /* TODO: may be use new HashTable iteration and prevent inplace modification */
-       hash = HASH_OF(var);
+       hash = Z_ARRVAL_P(var);
 
        bind = emalloc(sizeof(php_oci_bind));
        ZVAL_UNDEF(&bind->val);
@@ -1884,7 +1884,7 @@ php_oci_bind *php_oci_bind_array_helper_date(zval *var, zend_long max_table_leng
        sword errstatus;
 
        SEPARATE_ARRAY(var); /* TODO: may be use new HashTable iteration and prevent inplace modification */
-       hash = HASH_OF(var);
+       hash = Z_ARRVAL_P(var);
 
        bind = emalloc(sizeof(php_oci_bind));
        ZVAL_UNDEF(&bind->val);