Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a308b81

Browse files
author
Michael Maclean
committed
Replace calls to zend_hash_quick_find with NULL arguments
1 parent 34dce66 commit a308b81

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

redis_array.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -956,7 +956,7 @@ PHP_METHOD(RedisArray, mget)
956956

957957
if(pos[i] != n) continue;
958958

959-
zend_hash_quick_find(Z_ARRVAL_P(z_ret), NULL, 0, j, (void**)&z_cur);
959+
zend_hash_index_find(Z_ARRVAL_P(z_ret), j, (void**)&z_cur);
960960
j++;
961961

962962
MAKE_STD_ZVAL(z_tmp);
@@ -971,7 +971,7 @@ PHP_METHOD(RedisArray, mget)
971971

972972
/* copy temp array in the right order to return_value */
973973
for(i = 0; i < argc; ++i) {
974-
zend_hash_quick_find(Z_ARRVAL_P(z_tmp_array), NULL, 0, i, (void**)&z_cur);
974+
zend_hash_index_find(Z_ARRVAL_P(z_tmp_array), i, (void**)&z_cur);
975975

976976
MAKE_STD_ZVAL(z_tmp);
977977
*z_tmp = **z_cur;

redis_array_impl.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ ra_find_key(RedisArray *ra, zval *z_args, const char *cmd, int *key_len) {
510510
int key_pos = 0; /* TODO: change this depending on the command */
511511

512512
if( zend_hash_num_elements(Z_ARRVAL_P(z_args)) == 0
513-
|| zend_hash_quick_find(Z_ARRVAL_P(z_args), NULL, 0, key_pos, (void**)&zp_tmp) == FAILURE
513+
|| zend_hash_index_find(Z_ARRVAL_P(z_args), key_pos, (void**) &zp_tmp) == FAILURE
514514
|| Z_TYPE_PP(zp_tmp) != IS_STRING) {
515515

516516
return NULL;
@@ -553,7 +553,7 @@ ra_index_change_keys(const char *cmd, zval *z_keys, zval *z_redis TSRMLS_DC) {
553553
/* prepare keys */
554554
for(i = 0; i < argc - 1; ++i) {
555555
zval **zpp;
556-
zend_hash_quick_find(Z_ARRVAL_P(z_keys), NULL, 0, i, (void**)&zpp);
556+
zend_hash_index_find(Z_ARRVAL_P(z_keys), i, (void**)&zpp);
557557
z_args[i+1] = *zpp;
558558
}
559559

@@ -653,7 +653,7 @@ ra_index_exec(zval *z_redis, zval *return_value, int keep_all TSRMLS_DC) {
653653
if(keep_all) {
654654
*return_value = z_ret;
655655
zval_copy_ctor(return_value);
656-
} else if(zend_hash_quick_find(Z_ARRVAL(z_ret), NULL, 0, 0, (void**)&zp_tmp) != FAILURE) {
656+
} else if(zend_hash_index_find(Z_ARRVAL(z_ret), 0, (void**)&zp_tmp) != FAILURE) {
657657
*return_value = **zp_tmp;
658658
zval_copy_ctor(return_value);
659659
}

0 commit comments

Comments
 (0)