Skip to content

Commit

Permalink
Use CAT_STRL
Browse files Browse the repository at this point in the history
  • Loading branch information
dixyes committed Nov 28, 2024
1 parent 92154a3 commit 41dc478
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ext/src/swow_closure.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ static swow_php_ast_walker_op swow_closure_walker(zend_ast *ast, void *context_p
// see Zend/zend_language_parser.y near L369 top_statement syntax
ZEND_ASSERT(namespace != NULL);

smart_str_setl(&context->code_str, ZEND_STRL("namespace "));
smart_str_setl(&context->code_str, CAT_STRL("namespace "));
smart_str_appendl(&context->code_str, ZSTR_VAL(namespace), ZSTR_LEN(namespace));
smart_str_appendc(&context->code_str, ';');
context->in_namespace_brace = false;
Expand All @@ -126,11 +126,11 @@ static swow_php_ast_walker_op swow_closure_walker(zend_ast *ast, void *context_p
ZEND_ASSERT(stmts->kind == ZEND_AST_STMT_LIST);
if (!namespace) {
// at root namespace
smart_str_setl(&context->code_str, ZEND_STRL("namespace {"));
smart_str_setl(&context->code_str, CAT_STRL("namespace {"));
} else {
smart_str_setl(&context->code_str, ZEND_STRL("namespace "));
smart_str_setl(&context->code_str, CAT_STRL("namespace "));
smart_str_appendl(&context->code_str, ZSTR_VAL(namespace), ZSTR_LEN(namespace));
smart_str_appendl(&context->code_str, ZEND_STRL(" {"));
smart_str_appendl(&context->code_str, CAT_STRL(" {"));
}
context->in_namespace_brace = true;
break;
Expand Down

0 comments on commit 41dc478

Please sign in to comment.