@@ -187,19 +187,6 @@ static time_t zend_accel_get_time(void)
187187# define zend_accel_get_time () time(NULL)
188188#endif
189189
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-
203190static inline bool is_cacheable_stream_path (const char * filename )
204191{
205192 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_
10601047 if (file_handle -> opened_path ) {
10611048 char * file_path = ZSTR_VAL (file_handle -> opened_path );
10621049
1063- if (is_stream_path (file_path )) {
1050+ if (php_is_stream_path (file_path )) {
10641051 if (zend_get_stream_timestamp (file_path , & statbuf ) == SUCCESS ) {
10651052 break ;
10661053 }
@@ -1208,7 +1195,7 @@ zend_string *accel_make_persistent_key(zend_string *str)
12081195 /* CWD and include_path don't matter for absolute file names and streams */
12091196 if (IS_ABSOLUTE_PATH (path , path_length )) {
12101197 /* pass */
1211- } else if (UNEXPECTED (is_stream_path (path ))) {
1198+ } else if (UNEXPECTED (php_is_stream_path (path ))) {
12121199 if (!is_cacheable_stream_path (path )) {
12131200 return NULL ;
12141201 }
@@ -1891,7 +1878,7 @@ zend_op_array *file_cache_compile_file(zend_file_handle *file_handle, int type)
18911878 zend_op_array * op_array = NULL ;
18921879 bool from_memory ; /* if the script we've got is stored in SHM */
18931880
1894- if (is_stream_path (ZSTR_VAL (file_handle -> filename )) &&
1881+ if (php_is_stream_path (ZSTR_VAL (file_handle -> filename )) &&
18951882 !is_cacheable_stream_path (ZSTR_VAL (file_handle -> filename ))) {
18961883 return accelerator_orig_compile_file (file_handle , type );
18971884 }
@@ -2036,7 +2023,7 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type)
20362023 return accelerator_orig_compile_file (file_handle , type );
20372024 }
20382025 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 )))) {
20402027 ZCG (cache_opline ) = NULL ;
20412028 ZCG (cache_persistent_script ) = NULL ;
20422029 return accelerator_orig_compile_file (file_handle , type );
@@ -4050,7 +4037,7 @@ static void preload_link(void)
40504037
40514038static zend_string * preload_resolve_path (zend_string * filename )
40524039{
4053- if (is_stream_path (ZSTR_VAL (filename ))) {
4040+ if (php_is_stream_path (ZSTR_VAL (filename ))) {
40544041 return NULL ;
40554042 }
40564043 return zend_resolve_path (filename );
0 commit comments