Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Drop unnecessary HASH_OF uses in ext/oci8
These only operate on arrays.
  • Loading branch information
nikic committed Oct 11, 2018
1 parent bfaba83 commit 2c7be42
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ext/oci8/oci8_statement.c
Expand Up @@ -1023,7 +1023,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) {
Expand Down Expand Up @@ -1769,7 +1769,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);
Expand Down Expand Up @@ -1843,7 +1843,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);
Expand Down Expand Up @@ -1884,7 +1884,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);
Expand Down Expand Up @@ -1926,7 +1926,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);
Expand Down

0 comments on commit 2c7be42

Please sign in to comment.