Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpredis/phpredis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavlo Yatsukhnenko <yatsukhnenko@gmail.com>2016-11-03 10:47:39 +0300
committerPavlo Yatsukhnenko <yatsukhnenko@gmail.com>2016-11-03 21:36:33 +0300
commit36121f195b04dc66e15a9128ab2be267285a134b (patch)
treeee58f25a03c644868489fb678abd251dfc7da39d /cluster_library.c
parent9d98e0e35ff013afbc8fd3b9b6f811931be2d2eb (diff)
WIP: php7 compatibility
Replace STR_FREE with efree. Redis::hmget using zval* instead of zval**.
Diffstat (limited to 'cluster_library.c')
-rw-r--r--cluster_library.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/cluster_library.c b/cluster_library.c
index c4290968..2181826e 100644
--- a/cluster_library.c
+++ b/cluster_library.c
@@ -2455,7 +2455,7 @@ int mbulk_resp_loop_assoc(RedisSock *redis_sock, zval *z_result,
{
char *line;
int line_len,i=0;
- zval **z_keys = ctx;
+ zval *z_keys = ctx;
// Loop while we've got replies
while(count--) {
@@ -2464,21 +2464,20 @@ int mbulk_resp_loop_assoc(RedisSock *redis_sock, zval *z_result,
if(line != NULL) {
zval *z = NULL;
if(redis_unserialize(redis_sock, line, line_len, &z TSRMLS_CC)==1) {
- add_assoc_zval_ex(z_result,Z_STRVAL_P(z_keys[i]),
- Z_STRLEN_P(z_keys[i]), z);
+ add_assoc_zval_ex(z_result,Z_STRVAL(z_keys[i]),
+ Z_STRLEN(z_keys[i]), z);
} else {
- add_assoc_stringl_ex(z_result, Z_STRVAL_P(z_keys[i]),
- Z_STRLEN_P(z_keys[i]), line, line_len);
+ add_assoc_stringl_ex(z_result, Z_STRVAL(z_keys[i]),
+ Z_STRLEN(z_keys[i]), line, line_len);
}
efree(line);
} else {
- add_assoc_bool_ex(z_result, Z_STRVAL_P(z_keys[i]),
- Z_STRLEN_P(z_keys[i]), 0);
+ add_assoc_bool_ex(z_result, Z_STRVAL(z_keys[i]),
+ Z_STRLEN(z_keys[i]), 0);
}
// Clean up key context
- zval_dtor(z_keys[i]);
- efree(z_keys[i]);
+ zval_dtor(&z_keys[i]);
// Move to the next key
i++;