Skip to content

Commit

Permalink
Drop useless zend_accel_script_persistable() function
Browse files Browse the repository at this point in the history
  • Loading branch information
Girgias committed Jul 17, 2020
1 parent fa60f57 commit a1fee87
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 16 deletions.
10 changes: 0 additions & 10 deletions ext/opcache/ZendAccelerator.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand All @@ -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;
Expand Down
5 changes: 0 additions & 5 deletions ext/opcache/zend_persist.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
1 change: 0 additions & 1 deletion ext/opcache/zend_persist.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit a1fee87

Please sign in to comment.