diff options
| author | Dmitry Stogov <dmitry@zend.com> | 2017-12-14 22:46:22 +0300 |
|---|---|---|
| committer | Dmitry Stogov <dmitry@zend.com> | 2017-12-14 22:46:22 +0300 |
| commit | 0f06df310c879e3506409277831c4cba7d4d9af7 (patch) | |
| tree | b671614a3bdeaf315fa1f69bbbc76fa7e2ab3477 /ext | |
| parent | 83e495e0fdc0c59b449bd173d0c8df1999239634 (diff) | |
| download | php-git-0f06df310c879e3506409277831c4cba7d4d9af7.tar.gz | |
Turn "php_stream_wrapper"s into constants
Keep non-constant "php_stream_wrapper"s in API functions and callbacks for compatibility.
Diffstat (limited to 'ext')
| -rw-r--r-- | ext/bz2/bz2.c | 2 | ||||
| -rw-r--r-- | ext/phar/phar_internal.h | 2 | ||||
| -rw-r--r-- | ext/phar/stream.c | 2 | ||||
| -rw-r--r-- | ext/standard/ftp_fopen_wrapper.c | 2 | ||||
| -rw-r--r-- | ext/standard/http_fopen_wrapper.c | 2 | ||||
| -rw-r--r-- | ext/standard/php_fopen_wrapper.c | 2 | ||||
| -rw-r--r-- | ext/standard/php_fopen_wrappers.h | 8 | ||||
| -rw-r--r-- | ext/zip/php_zip.h | 2 | ||||
| -rw-r--r-- | ext/zip/zip_stream.c | 2 | ||||
| -rw-r--r-- | ext/zlib/php_zlib.h | 2 | ||||
| -rw-r--r-- | ext/zlib/zlib_fopen_wrapper.c | 2 |
11 files changed, 14 insertions, 14 deletions
diff --git a/ext/bz2/bz2.c b/ext/bz2/bz2.c index 5250bf49d3..5d25f3880d 100644 --- a/ext/bz2/bz2.c +++ b/ext/bz2/bz2.c @@ -331,7 +331,7 @@ static const php_stream_wrapper_ops bzip2_stream_wops = { NULL }; -static php_stream_wrapper php_stream_bzip2_wrapper = { +static const php_stream_wrapper php_stream_bzip2_wrapper = { &bzip2_stream_wops, NULL, 0 /* is_url */ diff --git a/ext/phar/phar_internal.h b/ext/phar/phar_internal.h index c08c88de19..88bad6832e 100644 --- a/ext/phar/phar_internal.h +++ b/ext/phar/phar_internal.h @@ -576,7 +576,7 @@ int phar_zip_flush(phar_archive_data *archive, char *user_stub, zend_long len, i #ifdef PHAR_MAIN static int phar_open_from_fp(php_stream* fp, char *fname, int fname_len, char *alias, int alias_len, int options, phar_archive_data** pphar, int is_data, char **error); -extern php_stream_wrapper php_stream_phar_wrapper; +extern const php_stream_wrapper php_stream_phar_wrapper; #else extern HashTable cached_phars; extern HashTable cached_alias; diff --git a/ext/phar/stream.c b/ext/phar/stream.c index 3ef49529c2..63703dde6a 100644 --- a/ext/phar/stream.c +++ b/ext/phar/stream.c @@ -48,7 +48,7 @@ const php_stream_wrapper_ops phar_stream_wops = { NULL }; -php_stream_wrapper php_stream_phar_wrapper = { +const php_stream_wrapper php_stream_phar_wrapper = { &phar_stream_wops, NULL, 0 /* is_url */ diff --git a/ext/standard/ftp_fopen_wrapper.c b/ext/standard/ftp_fopen_wrapper.c index f8491ccd05..8565accdf1 100644 --- a/ext/standard/ftp_fopen_wrapper.c +++ b/ext/standard/ftp_fopen_wrapper.c @@ -1184,7 +1184,7 @@ static const php_stream_wrapper_ops ftp_stream_wops = { NULL }; -PHPAPI php_stream_wrapper php_stream_ftp_wrapper = { +PHPAPI const php_stream_wrapper php_stream_ftp_wrapper = { &ftp_stream_wops, NULL, 1 /* is_url */ diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c index c9cb03518d..6c20b54056 100644 --- a/ext/standard/http_fopen_wrapper.c +++ b/ext/standard/http_fopen_wrapper.c @@ -1017,7 +1017,7 @@ static const php_stream_wrapper_ops http_stream_wops = { NULL }; -PHPAPI php_stream_wrapper php_stream_http_wrapper = { +PHPAPI const php_stream_wrapper php_stream_http_wrapper = { &http_stream_wops, NULL, 1 /* is_url */ diff --git a/ext/standard/php_fopen_wrapper.c b/ext/standard/php_fopen_wrapper.c index 9ac006b01a..47d4c40890 100644 --- a/ext/standard/php_fopen_wrapper.c +++ b/ext/standard/php_fopen_wrapper.c @@ -437,7 +437,7 @@ static const php_stream_wrapper_ops php_stdio_wops = { NULL }; -PHPAPI php_stream_wrapper php_stream_php_wrapper = { +PHPAPI const php_stream_wrapper php_stream_php_wrapper = { &php_stdio_wops, NULL, 0, /* is_url */ diff --git a/ext/standard/php_fopen_wrappers.h b/ext/standard/php_fopen_wrappers.h index b5a538184f..189496faee 100644 --- a/ext/standard/php_fopen_wrappers.h +++ b/ext/standard/php_fopen_wrappers.h @@ -25,9 +25,9 @@ php_stream *php_stream_url_wrap_http(php_stream_wrapper *wrapper, const char *path, const char *mode, int options, zend_string **opened_path, php_stream_context *context STREAMS_DC); php_stream *php_stream_url_wrap_ftp(php_stream_wrapper *wrapper, const char *path, const char *mode, int options, zend_string **opened_path, php_stream_context *context STREAMS_DC); -extern PHPAPI php_stream_wrapper php_stream_http_wrapper; -extern PHPAPI php_stream_wrapper php_stream_ftp_wrapper; -extern PHPAPI php_stream_wrapper php_stream_php_wrapper; -extern PHPAPI php_stream_wrapper php_plain_files_wrapper; +extern PHPAPI const php_stream_wrapper php_stream_http_wrapper; +extern PHPAPI const php_stream_wrapper php_stream_ftp_wrapper; +extern PHPAPI const php_stream_wrapper php_stream_php_wrapper; +extern PHPAPI const php_stream_wrapper php_plain_files_wrapper; #endif diff --git a/ext/zip/php_zip.h b/ext/zip/php_zip.h index 585309789e..bc41502182 100644 --- a/ext/zip/php_zip.h +++ b/ext/zip/php_zip.h @@ -77,7 +77,7 @@ static inline ze_zip_object *php_zip_fetch_object(zend_object *obj) { php_stream *php_stream_zip_opener(php_stream_wrapper *wrapper, const char *path, const char *mode, int options, zend_string **opened_path, php_stream_context *context STREAMS_DC); php_stream *php_stream_zip_open(const char *filename, const char *path, const char *mode STREAMS_DC); -extern php_stream_wrapper php_stream_zip_wrapper; +extern const php_stream_wrapper php_stream_zip_wrapper; #endif /* PHP_ZIP_H */ diff --git a/ext/zip/zip_stream.c b/ext/zip/zip_stream.c index d4c9d9394b..04e4198c8f 100644 --- a/ext/zip/zip_stream.c +++ b/ext/zip/zip_stream.c @@ -362,7 +362,7 @@ static const php_stream_wrapper_ops zip_stream_wops = { NULL /* metadata */ }; -php_stream_wrapper php_stream_zip_wrapper = { +const php_stream_wrapper php_stream_zip_wrapper = { &zip_stream_wops, NULL, 0 /* is_url */ diff --git a/ext/zlib/php_zlib.h b/ext/zlib/php_zlib.h index cf79ccd9c1..8b085f7de3 100644 --- a/ext/zlib/php_zlib.h +++ b/ext/zlib/php_zlib.h @@ -68,7 +68,7 @@ ZEND_END_MODULE_GLOBALS(zlib); php_stream *php_stream_gzopen(php_stream_wrapper *wrapper, const char *path, const char *mode, int options, zend_string **opened_path, php_stream_context *context STREAMS_DC); extern const php_stream_ops php_stream_gzio_ops; -extern php_stream_wrapper php_stream_gzip_wrapper; +extern const php_stream_wrapper php_stream_gzip_wrapper; extern const php_stream_filter_factory php_zlib_filter_factory; extern zend_module_entry php_zlib_module_entry; #define zlib_module_ptr &php_zlib_module_entry diff --git a/ext/zlib/zlib_fopen_wrapper.c b/ext/zlib/zlib_fopen_wrapper.c index aea7d2def2..e6e4bab9d5 100644 --- a/ext/zlib/zlib_fopen_wrapper.c +++ b/ext/zlib/zlib_fopen_wrapper.c @@ -181,7 +181,7 @@ static const php_stream_wrapper_ops gzip_stream_wops = { NULL }; -php_stream_wrapper php_stream_gzip_wrapper = { +const php_stream_wrapper php_stream_gzip_wrapper = { &gzip_stream_wops, NULL, 0, /* is_url */ |
