diff --git a/Zend/zend_ast.c b/Zend/zend_ast.c index 5104aad3510e0..26a0cbd16ca51 100644 --- a/Zend/zend_ast.c +++ b/Zend/zend_ast.c @@ -1871,7 +1871,7 @@ static ZEND_COLD void zend_ast_export_class_no_header(smart_str *str, zend_ast_d smart_str_appends(str, " {\n"); zend_ast_export_stmt(str, decl->child[2], indent + 1); zend_ast_export_indent(str, indent); - smart_str_appends(str, "}"); + smart_str_appendc(str, '}'); } static ZEND_COLD void zend_ast_export_attribute_group(smart_str *str, zend_ast *ast, int indent) { @@ -1899,7 +1899,7 @@ static ZEND_COLD void zend_ast_export_attributes(smart_str *str, zend_ast *ast, for (i = 0; i < list->children; i++) { smart_str_appends(str, "#["); zend_ast_export_attribute_group(str, list->child[i], indent); - smart_str_appends(str, "]"); + smart_str_appendc(str, ']'); if (newlines) { smart_str_appendc(str, '\n'); @@ -2060,7 +2060,7 @@ static ZEND_COLD void zend_ast_export_ex(smart_str *str, zend_ast *ast, int prio case ZEND_AST_OP_ARRAY: smart_str_appends(str, "Closure("); smart_str_append(str, zend_ast_get_op_array(ast)->op_array->function_name); - smart_str_appends(str, ")"); + smart_str_appendc(str, ')'); break; case ZEND_AST_CONSTANT_CLASS: smart_str_appendl(str, "__CLASS__", sizeof("__CLASS__")-1); @@ -2427,9 +2427,9 @@ static ZEND_COLD void zend_ast_export_ex(smart_str *str, zend_ast *ast, int prio case ZEND_AST_CALL: { zend_ast *left = ast->child[0]; if (left->kind == ZEND_AST_ARROW_FUNC || left->kind == ZEND_AST_CLOSURE) { - smart_str_appends(str, "("); + smart_str_appendc(str, '('); zend_ast_export_ns_name(str, left, 0, indent); - smart_str_appends(str, ")"); + smart_str_appendc(str, ')'); } else { zend_ast_export_ns_name(str, left, 0, indent); } @@ -2679,9 +2679,9 @@ static ZEND_COLD void zend_ast_export_ex(smart_str *str, zend_ast *ast, int prio smart_str_appends(str, " {\n"); zend_ast_export_ex(str, ast->child[1], 0, indent + 1); zend_ast_export_indent(str, indent); - smart_str_appends(str, "}"); + smart_str_appendc(str, '}'); } else { - smart_str_appends(str, ";"); + smart_str_appendc(str, ';'); } break; case ZEND_AST_TRAIT_PRECEDENCE: