@@ -187,19 +187,6 @@ static time_t zend_accel_get_time(void)
187
187
# define zend_accel_get_time () time(NULL)
188
188
#endif
189
189
190
- static inline bool is_stream_path (const char * filename )
191
- {
192
- const char * p ;
193
-
194
- for (p = filename ;
195
- (* p >= 'a' && * p <= 'z' ) ||
196
- (* p >= 'A' && * p <= 'Z' ) ||
197
- (* p >= '0' && * p <= '9' ) ||
198
- * p == '+' || * p == '-' || * p == '.' ;
199
- p ++ );
200
- return ((p != filename ) && (p [0 ] == ':' ) && (p [1 ] == '/' ) && (p [2 ] == '/' ));
201
- }
202
-
203
190
static inline bool is_cacheable_stream_path (const char * filename )
204
191
{
205
192
return memcmp (filename , "file://" , sizeof ("file://" ) - 1 ) == 0 ||
@@ -1060,7 +1047,7 @@ accel_time_t zend_get_file_handle_timestamp(zend_file_handle *file_handle, size_
1060
1047
if (file_handle -> opened_path ) {
1061
1048
char * file_path = ZSTR_VAL (file_handle -> opened_path );
1062
1049
1063
- if (is_stream_path (file_path )) {
1050
+ if (php_is_stream_path (file_path )) {
1064
1051
if (zend_get_stream_timestamp (file_path , & statbuf ) == SUCCESS ) {
1065
1052
break ;
1066
1053
}
@@ -1208,7 +1195,7 @@ zend_string *accel_make_persistent_key(zend_string *str)
1208
1195
/* CWD and include_path don't matter for absolute file names and streams */
1209
1196
if (IS_ABSOLUTE_PATH (path , path_length )) {
1210
1197
/* pass */
1211
- } else if (UNEXPECTED (is_stream_path (path ))) {
1198
+ } else if (UNEXPECTED (php_is_stream_path (path ))) {
1212
1199
if (!is_cacheable_stream_path (path )) {
1213
1200
return NULL ;
1214
1201
}
@@ -1891,7 +1878,7 @@ zend_op_array *file_cache_compile_file(zend_file_handle *file_handle, int type)
1891
1878
zend_op_array * op_array = NULL ;
1892
1879
bool from_memory ; /* if the script we've got is stored in SHM */
1893
1880
1894
- if (is_stream_path (ZSTR_VAL (file_handle -> filename )) &&
1881
+ if (php_is_stream_path (ZSTR_VAL (file_handle -> filename )) &&
1895
1882
!is_cacheable_stream_path (ZSTR_VAL (file_handle -> filename ))) {
1896
1883
return accelerator_orig_compile_file (file_handle , type );
1897
1884
}
@@ -2036,7 +2023,7 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type)
2036
2023
return accelerator_orig_compile_file (file_handle , type );
2037
2024
}
2038
2025
persistent_script = zend_accel_hash_find (& ZCSG (hash ), key );
2039
- } else if (UNEXPECTED (is_stream_path (ZSTR_VAL (file_handle -> filename )) && !is_cacheable_stream_path (ZSTR_VAL (file_handle -> filename )))) {
2026
+ } else if (UNEXPECTED (php_is_stream_path (ZSTR_VAL (file_handle -> filename )) && !is_cacheable_stream_path (ZSTR_VAL (file_handle -> filename )))) {
2040
2027
ZCG (cache_opline ) = NULL ;
2041
2028
ZCG (cache_persistent_script ) = NULL ;
2042
2029
return accelerator_orig_compile_file (file_handle , type );
@@ -4050,7 +4037,7 @@ static void preload_link(void)
4050
4037
4051
4038
static zend_string * preload_resolve_path (zend_string * filename )
4052
4039
{
4053
- if (is_stream_path (ZSTR_VAL (filename ))) {
4040
+ if (php_is_stream_path (ZSTR_VAL (filename ))) {
4054
4041
return NULL ;
4055
4042
}
4056
4043
return zend_resolve_path (filename );
0 commit comments