projects
/
m6w6
/
ext-psi
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
| inline |
side by side
(parent:
8355e92
)
context: avoid duplicate registration of enum constants
author
Michael Wallner
<mike@php.net>
Tue, 5 Sep 2017 10:27:38 +0000
(12:27 +0200)
committer
Michael Wallner
<mike@php.net>
Tue, 5 Sep 2017 10:27:38 +0000
(12:27 +0200)
src/context.c
patch
|
blob
|
history
diff --git
a/src/context.c
b/src/context.c
index ea36917cceca41aa75d4f25406a3c91067dab8d9..bc3fb4506bdd125012885e9e1274c824ccae1137 100644
(file)
--- 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);