diff options
Diffstat (limited to 'ext/opcache/zend_persist_calc.c')
-rw-r--r-- | ext/opcache/zend_persist_calc.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/ext/opcache/zend_persist_calc.c b/ext/opcache/zend_persist_calc.c index a3c2d1a905..0431054f76 100644 --- a/ext/opcache/zend_persist_calc.c +++ b/ext/opcache/zend_persist_calc.c @@ -292,6 +292,21 @@ static void zend_persist_property_info_calc(zval *zv) } } +static void zend_persist_class_constant_calc(zval *zv) +{ + zend_class_constant *c = Z_PTR_P(zv); + + if (!zend_shared_alloc_get_xlat_entry(c)) { + zend_shared_alloc_register_xlat_entry(c, c); + ADD_ARENA_SIZE(sizeof(zend_class_constant)); + zend_persist_zval_calc(&c->value); + if (ZCG(accel_directives).save_comments && c->doc_comment) { + ADD_STRING(c->doc_comment); + } + } +} + + static void zend_persist_class_entry_calc(zval *zv) { zend_class_entry *ce = Z_PTR_P(zv); @@ -316,7 +331,7 @@ static void zend_persist_class_entry_calc(zval *zv) zend_persist_zval_calc(&ce->default_static_members_table[i]); } } - zend_hash_persist_calc(&ce->constants_table, zend_persist_zval_calc); + zend_hash_persist_calc(&ce->constants_table, zend_persist_class_constant_calc); if (ce->info.user.filename) { ADD_STRING(ce->info.user.filename); |