X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=blobdiff_plain;f=src%2Fcontext.c;h=bc3fb4506bdd125012885e9e1274c824ccae1137;hp=ea36917cceca41aa75d4f25406a3c91067dab8d9;hb=ad370ff72bd28ebbcb1087138c926ef93eab394b;hpb=53495ef4bd0321f7f92dd05eef8e01b90d7b415a diff --git a/src/context.c b/src/context.c index ea36917..bc3fb45 100644 --- a/src/context.c +++ b/src/context.c @@ -340,6 +340,11 @@ zend_function_entry *psi_context_compile(struct psi_context *C) name = strpprintf(0, "psi\\%s\\%s", e->name, item->name); } + if (zend_get_constant(name)) { + zend_string_release(name); + continue; + } + zc.name = zend_string_dup(name, 1); ZVAL_LONG(&zc.value, psi_long_num_exp(item->num, NULL, NULL)); zend_register_constant(&zc);