com php-src: Get rid of accel_deactivate() calback: ext/opcache/ZendAccelerator.c

From: Date: Mon, 01 Oct 2018 10:53:15 +0000
Subject: com php-src: Get rid of accel_deactivate() calback: ext/opcache/ZendAccelerator.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-103295@lists.php.net to get a copy of this message
Commit: c25e7439ae3917be171ae1ba55f78013f92c2e14 Author: Dmitry Stogov <dmitry@zend.com> Mon, 1 Oct 2018 13:53:15 +0300 Parents: 2d87b51ae9dafc4000830bdebd49d7665d0a4f6f Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=c25e7439ae3917be171ae1ba55f78013f92c2e14 Log: Get rid of accel_deactivate() calback Changed paths: M ext/opcache/ZendAccelerator.c Diff: diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index bbdda94..6a0d991 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -2414,6 +2414,11 @@ static void accel_activate(void) int accel_post_deactivate(void) { + if (ZCG(cwd)) { + zend_string_release_ex(ZCG(cwd), 0); + ZCG(cwd) = NULL; + } + if (!ZCG(enabled) || !accel_startup_ok) { return SUCCESS; } @@ -2425,23 +2430,6 @@ int accel_post_deactivate(void) return SUCCESS; } -static void accel_deactivate(void) -{ - /* ensure that we restore function_table and class_table - * In general, they're restored by persistent_compile_file(), but in case - * the script is aborted abnormally, they may become messed up. - */ - - if (ZCG(cwd)) { - zend_string_release_ex(ZCG(cwd), 0); - ZCG(cwd) = NULL; - } - - if (!ZCG(enabled) || !accel_startup_ok) { - return; - } -} - static int accelerator_remove_cb(zend_extension *element1, zend_extension *element2) { (void)element2; /* keep the compiler happy */ @@ -3039,7 +3027,7 @@ ZEND_EXT_API zend_extension zend_extension_entry = { accel_startup, /* startup */ NULL, /* shutdown */ accel_activate, /* per-script activation */ - accel_deactivate, /* per-script deactivation */ + NULL, /* per-script deactivation */ NULL, /* message handler */ NULL, /* op_array handler */ NULL, /* extended statement handler */

« previous php.cvs (#103295) next »