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:
31cfe5e
)
don't register constants with its anon prefix
author
Michael Wallner
<mike@php.net>
Fri, 7 Jul 2017 07:27:57 +0000
(09:27 +0200)
committer
Michael Wallner
<mike@php.net>
Fri, 7 Jul 2017 07:27:57 +0000
(09:27 +0200)
src/context.c
patch
|
blob
|
history
diff --git
a/src/context.c
b/src/context.c
index 584994f3fd38be672509fca4f49ea15ae26d5c1d..6408ebeec29f374138237de87301bf4292110d38 100644
(file)
--- a/
src/context.c
+++ b/
src/context.c
@@
-332,7
+332,13
@@
zend_function_entry *psi_context_compile(struct psi_context *C)
struct psi_decl_enum_item *item;
while (psi_plist_get(e->items, j++, &item)) {
struct psi_decl_enum_item *item;
while (psi_plist_get(e->items, j++, &item)) {
- zend_string *name = strpprintf(0, "psi\\%s\\%s", e->name, item->name);
+ zend_string *name;
+
+ if (psi_decl_type_is_anon(e->name, "enum")) {
+ name = strpprintf(0, "psi\\%s", item->name);
+ } else {
+ name = strpprintf(0, "psi\\%s\\%s", e->name, item->name);
+ }
zc.name = zend_string_dup(name, 1);
ZVAL_LONG(&zc.value, psi_long_num_exp(item->num, NULL, NULL));
zc.name = zend_string_dup(name, 1);
ZVAL_LONG(&zc.value, psi_long_num_exp(item->num, NULL, NULL));