From ceecd31cb6d96cef0d8b924fb2f03932b53cf7e3 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 1 Apr 2014 11:44:11 +0400 Subject: [PATCH] Fixed support for arg_info and type hinfing (TODO: names should be interned) --- ext/opcache/zend_persist.c | 6 ++---- ext/opcache/zend_persist_calc.c | 2 ++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/opcache/zend_persist.c b/ext/opcache/zend_persist.c index 64833d0cfa..5562f8c55d 100644 --- a/ext/opcache/zend_persist.c +++ b/ext/opcache/zend_persist.c @@ -354,13 +354,11 @@ static void zend_persist_op_array_ex(zend_op_array *op_array, zend_persistent_sc for (i = 0; i < op_array->num_args; i++) { if (op_array->arg_info[i].name) { //??? zend_accel_store_interned_string(op_array->arg_info[i].name, op_array->arg_info[i].name_len + 1); - efree((char*)op_array->arg_info[i].name); - op_array->arg_info[i].name = NULL; + zend_accel_store(op_array->arg_info[i].name, op_array->arg_info[i].name_len + 1); } if (op_array->arg_info[i].class_name) { //??? zend_accel_store_interned_string(op_array->arg_info[i].class_name, op_array->arg_info[i].class_name_len + 1); - efree((char*)op_array->arg_info[i].class_name); - op_array->arg_info[i].class_name = NULL; + zend_accel_store(op_array->arg_info[i].class_name, op_array->arg_info[i].class_name_len + 1); } } } diff --git a/ext/opcache/zend_persist_calc.c b/ext/opcache/zend_persist_calc.c index 089b09b4ad..5bd358df5c 100644 --- a/ext/opcache/zend_persist_calc.c +++ b/ext/opcache/zend_persist_calc.c @@ -209,9 +209,11 @@ static uint zend_persist_op_array_calc_ex(zend_op_array *op_array TSRMLS_DC) for (i = 0; i < op_array->num_args; i++) { if (op_array->arg_info[i].name) { //??? ADD_INTERNED_STRING(op_array->arg_info[i].name, op_array->arg_info[i].name_len + 1); + ADD_SIZE(op_array->arg_info[i].name_len + 1); } if (op_array->arg_info[i].class_name) { //??? ADD_INTERNED_STRING(op_array->arg_info[i].class_name, op_array->arg_info[i].class_name_len + 1); + ADD_SIZE(op_array->arg_info[i].class_name_len + 1); } } -- 2.50.1