Skip to content

Commit

Permalink
update;
Browse files Browse the repository at this point in the history
  • Loading branch information
sasou committed Nov 1, 2024
1 parent 6430b44 commit 54f2a0b
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/cache/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,14 @@ void makeArgsArr(zval *arr, smart_str *tmp_s) { /*{{{*/
}ZEND_HASH_FOREACH_END();
}
/*}}}*/
void convert_val_to_string(zval *element, smart_str *tmp_s) { /*{{{*/
zval tmp;
ZVAL_COPY(&tmp, element);
convert_to_string(&tmp);
smart_str_appendl(tmp_s, Z_STRVAL(tmp), Z_STRLEN(tmp));
zval_ptr_dtor(&tmp);
}
/*}}}*/
void makeArgsKey(zend_ulong indexs, zend_string *id, zval *element, smart_str *tmp_s) { /*{{{*/
if (id != NULL) {
smart_str_appendl(tmp_s, ZSTR_VAL(id), ZSTR_LEN(id));
Expand All @@ -243,11 +251,7 @@ void makeArgsKey(zend_ulong indexs, zend_string *id, zval *element, smart_str *t
case IS_REFERENCE:
break;
default:
zval tmp;
ZVAL_COPY(&tmp, element);
convert_to_string(&tmp);
smart_str_appendl(tmp_s, Z_STRVAL(tmp), Z_STRLEN(tmp));
zval_ptr_dtor(&tmp);
convert_val_to_string(element, tmp_s);
break;
}
}
Expand Down

0 comments on commit 54f2a0b

Please sign in to comment.