Use ZSTR_VAL and ZSTR_LEN macroses to access zend_string fields

This commit is contained in:
Pavlo Yatsukhnenko
2017-08-02 13:02:07 +03:00
parent 7c140714e3
commit 4e32254ec2
9 changed files with 91 additions and 87 deletions
+2 -2
View File
@@ -590,7 +590,7 @@ ra_index_keys(zval *z_pairs, zval *z_redis TSRMLS_DC) {
#endif
if (zkey) {
ZVAL_STRINGL(z_new, zkey->val, zkey->len);
ZVAL_STRINGL(z_new, ZSTR_VAL(zkey), ZSTR_LEN(zkey));
} else {
ZVAL_LONG(z_new, idx);
}
@@ -898,7 +898,7 @@ ra_move_zset(const char *key, int key_len, zval *z_from, zval *z_to, long ttl TS
/* add value */
if (zkey) {
ZVAL_STRINGL(&z_zadd_args[i+1], zkey->val, zkey->len);
ZVAL_STRINGL(&z_zadd_args[i+1], ZSTR_VAL(zkey), ZSTR_LEN(zkey));
} else {
ZVAL_LONG(&z_zadd_args[i+1], (long)idx);
}