summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2018-10-24 11:49:44 +0300
committerDmitry Stogov <dmitry@zend.com>2018-10-24 11:49:44 +0300
commit770fe51bfd8994c3df819cbf04b7d76824b55e5c (patch)
tree8cffa4fd81e712388cf691b2c9a5ebbd19010465
parent5df17425d36cc175d8751c40114c8bad9937ea06 (diff)
downloadphp-git-770fe51bfd8994c3df819cbf04b7d76824b55e5c.tar.gz
Make php_plain_files_wrapper to be writable (workaround for swoole)
-rw-r--r--ext/standard/php_fopen_wrappers.h2
-rw-r--r--main/streams/php_stream_plain_wrapper.h2
-rw-r--r--main/streams/plain_wrapper.c3
3 files changed, 4 insertions, 3 deletions
diff --git a/ext/standard/php_fopen_wrappers.h b/ext/standard/php_fopen_wrappers.h
index b172eb46bb..e37ade9eb9 100644
--- a/ext/standard/php_fopen_wrappers.h
+++ b/ext/standard/php_fopen_wrappers.h
@@ -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
diff --git a/main/streams/php_stream_plain_wrapper.h b/main/streams/php_stream_plain_wrapper.h
index 183a12d2a2..17c0e72082 100644
--- a/main/streams/php_stream_plain_wrapper.h
+++ b/main/streams/php_stream_plain_wrapper.h
@@ -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()
diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c
index b2fc00b226..fdfc7b4f63 100644
--- a/main/streams/plain_wrapper.c
+++ b/main/streams/plain_wrapper.c
@@ -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