X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=blobdiff_plain;f=src%2Fcontext.c;h=8fdbf22f41a2701b60833ce59407f3c48b078122;hp=995a0010498aa1d11c75f236b57183f130dbf55a;hb=2559f07a178b681dc240e20153ff5abdff54cb34;hpb=2fa436074ca9a5e87f39b696de832fa2188fcfc6 diff --git a/src/context.c b/src/context.c index 995a001..8fdbf22 100644 --- a/src/context.c +++ b/src/context.c @@ -142,7 +142,7 @@ void psi_context_build(struct psi_context *C, const char *paths) psi_parser_parse(&P, I); psi_context_add(C, &P); psi_parser_dtor(&P); - free(I); + psi_parser_input_free(&I); } } @@ -196,6 +196,9 @@ zend_function_entry *psi_context_compile(struct psi_context *C) case PSI_T_STRING: case PSI_T_QUOTED_STRING: ZVAL_NEW_STR(&zc.value, zend_string_copy(c->val->ival.zend.str)); + if (ZSTR_IS_INTERNED(Z_STR(zc.value))) { + Z_TYPE_FLAGS(zc.value) = 0; + } break; default: assert(0);