From 1e831439a522615d41b18dc2ca54c67585740350 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 23 Sep 2014 12:35:16 +0400 Subject: [PATCH] Make internal function names to be interned strings --- ext/opcache/ZendAccelerator.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index e210a462103..b5c20f91e47 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -384,6 +384,9 @@ static void accel_use_shm_interned_strings(TSRMLS_D) if (p->key) { p->key = accel_new_interned_string(p->key TSRMLS_CC); } + if (Z_FUNC(p->val)->common.function_name) { + Z_FUNC(p->val)->common.function_name = accel_new_interned_string(Z_FUNC(p->val)->common.function_name TSRMLS_CC); + } } /* class table hash keys, class names, properties, methods, constants, etc */ @@ -425,6 +428,9 @@ static void accel_use_shm_interned_strings(TSRMLS_D) if (q->key) { q->key = accel_new_interned_string(q->key TSRMLS_CC); } + if (Z_FUNC(q->val)->common.function_name) { + Z_FUNC(q->val)->common.function_name = accel_new_interned_string(Z_FUNC(q->val)->common.function_name TSRMLS_CC); + } } for (j = 0; j < ce->constants_table.nNumUsed; j++) {