]> granicus.if.org Git - php/commitdiff
Make php_plain_files_wrapper to be writable (workaround for swoole)
authorDmitry Stogov <dmitry@zend.com>
Wed, 24 Oct 2018 08:49:44 +0000 (11:49 +0300)
committerDmitry Stogov <dmitry@zend.com>
Wed, 24 Oct 2018 08:49:44 +0000 (11:49 +0300)
ext/standard/php_fopen_wrappers.h
main/streams/php_stream_plain_wrapper.h
main/streams/plain_wrapper.c

index b172eb46bb6181046c821c7a603f0bd5c847068e..e37ade9eb9ecd454dac526c695ea1e98106721f6 100644 (file)
@@ -26,6 +26,6 @@ php_stream *php_stream_url_wrap_ftp(php_stream_wrapper *wrapper, const char *pat
 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;
+extern PHPAPI /*const*/ php_stream_wrapper php_plain_files_wrapper;
 
 #endif
index 183a12d2a2e501dc5cf7ad0462a27243271e1d36..17c0e7208256ceb4c4198930058a272588046582 100644 (file)
@@ -20,7 +20,7 @@
 
 /* operations for a plain file; use the php_stream_fopen_XXX funcs below */
 PHPAPI extern php_stream_ops php_stream_stdio_ops;
-PHPAPI extern const php_stream_wrapper php_plain_files_wrapper;
+PHPAPI extern /*const*/ php_stream_wrapper php_plain_files_wrapper;
 
 BEGIN_EXTERN_C()
 
index b2fc00b2264573d7ebf8cba290aa8fe74d395cdd..fdfc7b4f634e68984eb4231c7fb6619d4698a558 100644 (file)
@@ -1453,7 +1453,8 @@ static const php_stream_wrapper_ops php_plain_files_wrapper_ops = {
        php_plain_files_metadata
 };
 
-PHPAPI const php_stream_wrapper php_plain_files_wrapper = {
+/* TODO: We have to make php_plain_files_wrapper writable to support SWOOLE */
+PHPAPI /*const*/ php_stream_wrapper php_plain_files_wrapper = {
        &php_plain_files_wrapper_ops,
        NULL,
        0