Skip to content

Commit a1fee87

Browse files
committed
Drop useless zend_accel_script_persistable() function
1 parent fa60f57 commit a1fee87

File tree

3 files changed

+0
-16
lines changed

3 files changed

+0
-16
lines changed

ext/opcache/ZendAccelerator.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1415,11 +1415,6 @@ static zend_persistent_script *cache_script_in_file_cache(zend_persistent_script
14151415
{
14161416
uint32_t orig_compiler_options;
14171417

1418-
/* Check if script may be stored in shared memory */
1419-
if (!zend_accel_script_persistable(new_persistent_script)) {
1420-
return new_persistent_script;
1421-
}
1422-
14231418
orig_compiler_options = CG(compiler_options);
14241419
CG(compiler_options) |= ZEND_COMPILE_WITH_FILE_CACHE;
14251420
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
14381433
uint32_t memory_used;
14391434
uint32_t orig_compiler_options;
14401435

1441-
/* Check if script may be stored in shared memory */
1442-
if (!zend_accel_script_persistable(new_persistent_script)) {
1443-
return new_persistent_script;
1444-
}
1445-
14461436
orig_compiler_options = CG(compiler_options);
14471437
if (ZCG(accel_directives).file_cache) {
14481438
CG(compiler_options) |= ZEND_COMPILE_WITH_FILE_CACHE;

ext/opcache/zend_persist.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1241,8 +1241,3 @@ zend_persistent_script *zend_accel_script_persist(zend_persistent_script *script
12411241

12421242
return script;
12431243
}
1244-
1245-
int zend_accel_script_persistable(zend_persistent_script *script)
1246-
{
1247-
return 1;
1248-
}

ext/opcache/zend_persist.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
#ifndef ZEND_PERSIST_H
2323
#define ZEND_PERSIST_H
2424

25-
int zend_accel_script_persistable(zend_persistent_script *script);
2625
uint32_t zend_accel_script_persist_calc(zend_persistent_script *script, const char *key, unsigned int key_length, int for_shm);
2726
zend_persistent_script *zend_accel_script_persist(zend_persistent_script *script, const char **key, unsigned int key_length, int for_shm);
2827

0 commit comments

Comments
 (0)