}
/* }}} */
-/* must support result==op1 */
-ZEND_API int ZEND_FASTCALL add_char_to_string(zval *result, const zval *op1, const zval *op2) /* {{{ */
-{
- size_t length = Z_STRLEN_P(op1) + 1;
- zend_string *buf = zend_string_extend(Z_STR_P(op1), length, 0);
-
- buf->val[length - 1] = (char) Z_LVAL_P(op2);
- buf->val[length] = 0;
- ZVAL_NEW_STR(result, buf);
- return SUCCESS;
-}
-/* }}} */
-
-/* must support result==op1 */
-ZEND_API int ZEND_FASTCALL add_string_to_string(zval *result, const zval *op1, const zval *op2) /* {{{ */
-{
- size_t op1_len = Z_STRLEN_P(op1);
- size_t length = op1_len + Z_STRLEN_P(op2);
- zend_string *buf = zend_string_extend(Z_STR_P(op1), length, 0);
-
- memcpy(buf->val + op1_len, Z_STRVAL_P(op2), Z_STRLEN_P(op2));
- buf->val[length] = 0;
- ZVAL_NEW_STR(result, buf);
- return SUCCESS;
-}
-/* }}} */
-
ZEND_API int ZEND_FASTCALL concat_function(zval *result, zval *op1, zval *op2) /* {{{ */
{
zval op1_copy, op2_copy;
#define zval_get_double(op) _zval_get_double((op))
#define zval_get_string(op) _zval_get_string((op))
-ZEND_API int ZEND_FASTCALL add_char_to_string(zval *result, const zval *op1, const zval *op2);
-ZEND_API int ZEND_FASTCALL add_string_to_string(zval *result, const zval *op1, const zval *op2);
#define convert_to_cstring(op) if (Z_TYPE_P(op) != IS_STRING) { _convert_to_cstring((op) ZEND_FILE_LINE_CC); }
#define convert_to_string(op) if (Z_TYPE_P(op) != IS_STRING) { _convert_to_string((op) ZEND_FILE_LINE_CC); }
if (Z_TYPE(val2) != IS_STRING || *Z_STRVAL(val) != '<') {
break;
}
- add_string_to_string(&val, &val, &val2);
+ concat_function(&val, &val, &val2);
zval_ptr_dtor(&val2);
node = node->next;
}