From: George Peter Banyard Date: Thu, 16 Jul 2020 19:07:01 +0000 (+0200) Subject: Drop useless zend_accel_script_persistable() function X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a1fee87c9a8a6ed58f2a8270c0a9e61a674d32db;p=php Drop useless zend_accel_script_persistable() function --- diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 120ba00289..6f3ff1cead 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -1415,11 +1415,6 @@ static zend_persistent_script *cache_script_in_file_cache(zend_persistent_script { uint32_t orig_compiler_options; - /* Check if script may be stored in shared memory */ - if (!zend_accel_script_persistable(new_persistent_script)) { - return new_persistent_script; - } - orig_compiler_options = CG(compiler_options); CG(compiler_options) |= ZEND_COMPILE_WITH_FILE_CACHE; if (!zend_optimize_script(&new_persistent_script->script, ZCG(accel_directives).optimization_level, ZCG(accel_directives).opt_debug_level)) { @@ -1438,11 +1433,6 @@ static zend_persistent_script *cache_script_in_shared_memory(zend_persistent_scr uint32_t memory_used; uint32_t orig_compiler_options; - /* Check if script may be stored in shared memory */ - if (!zend_accel_script_persistable(new_persistent_script)) { - return new_persistent_script; - } - orig_compiler_options = CG(compiler_options); if (ZCG(accel_directives).file_cache) { CG(compiler_options) |= ZEND_COMPILE_WITH_FILE_CACHE; diff --git a/ext/opcache/zend_persist.c b/ext/opcache/zend_persist.c index f4400b07d4..1b2db5f69a 100644 --- a/ext/opcache/zend_persist.c +++ b/ext/opcache/zend_persist.c @@ -1241,8 +1241,3 @@ zend_persistent_script *zend_accel_script_persist(zend_persistent_script *script return script; } - -int zend_accel_script_persistable(zend_persistent_script *script) -{ - return 1; -} diff --git a/ext/opcache/zend_persist.h b/ext/opcache/zend_persist.h index 78b6b0f6d9..d5eca3f195 100644 --- a/ext/opcache/zend_persist.h +++ b/ext/opcache/zend_persist.h @@ -22,7 +22,6 @@ #ifndef ZEND_PERSIST_H #define ZEND_PERSIST_H -int zend_accel_script_persistable(zend_persistent_script *script); uint32_t zend_accel_script_persist_calc(zend_persistent_script *script, const char *key, unsigned int key_length, int for_shm); zend_persistent_script *zend_accel_script_persist(zend_persistent_script *script, const char **key, unsigned int key_length, int for_shm);