Skip to content

Commit 770fe51

Browse files
committed
Make php_plain_files_wrapper to be writable (workaround for swoole)
1 parent 5df1742 commit 770fe51

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

ext/standard/php_fopen_wrappers.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ php_stream *php_stream_url_wrap_ftp(php_stream_wrapper *wrapper, const char *pat
2626
extern PHPAPI const php_stream_wrapper php_stream_http_wrapper;
2727
extern PHPAPI const php_stream_wrapper php_stream_ftp_wrapper;
2828
extern PHPAPI const php_stream_wrapper php_stream_php_wrapper;
29-
extern PHPAPI const php_stream_wrapper php_plain_files_wrapper;
29+
extern PHPAPI /*const*/ php_stream_wrapper php_plain_files_wrapper;
3030

3131
#endif

main/streams/php_stream_plain_wrapper.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
/* operations for a plain file; use the php_stream_fopen_XXX funcs below */
2222
PHPAPI extern php_stream_ops php_stream_stdio_ops;
23-
PHPAPI extern const php_stream_wrapper php_plain_files_wrapper;
23+
PHPAPI extern /*const*/ php_stream_wrapper php_plain_files_wrapper;
2424

2525
BEGIN_EXTERN_C()
2626

main/streams/plain_wrapper.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -1453,7 +1453,8 @@ static const php_stream_wrapper_ops php_plain_files_wrapper_ops = {
14531453
php_plain_files_metadata
14541454
};
14551455

1456-
PHPAPI const php_stream_wrapper php_plain_files_wrapper = {
1456+
/* TODO: We have to make php_plain_files_wrapper writable to support SWOOLE */
1457+
PHPAPI /*const*/ php_stream_wrapper php_plain_files_wrapper = {
14571458
&php_plain_files_wrapper_ops,
14581459
NULL,
14591460
0

0 commit comments

Comments
 (0)