[PATCH 06/11] Adopt to changed stream API interface

From: Date: Tue, 19 Jul 2016 21:05:56 +0000
Subject: [PATCH 06/11] Adopt to changed stream API interface
References: 1  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-13862@lists.php.net to get a copy of this message
Signed-off-by: Michael Heimpold <mhei@heimpold.de> --- dio_posix.c | 2 +- dio_stream_wrappers.c | 14 +++++++------- dio_win32.c | 2 +- php_dio_common.h | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/dio_posix.c b/dio_posix.c index 6ed8630..527d683 100644 --- a/dio_posix.c +++ b/dio_posix.c @@ -474,7 +474,7 @@ int dio_common_set_option(php_dio_stream_data *data, int option, int value, void /* {{{ dio_raw_open_stream * Opens the underlying stream. */ -int dio_raw_open_stream(char *filename, char *mode, php_dio_stream_data *data TSRMLS_DC) { +int dio_raw_open_stream(const char *filename, char *mode, php_dio_stream_data *data TSRMLS_DC) { php_dio_posix_stream_data *pdata = (php_dio_posix_stream_data*)data; pdata->flags = dio_stream_mode_to_flags(mode); diff --git a/dio_stream_wrappers.c b/dio_stream_wrappers.c index 811bc07..817b0d1 100644 --- a/dio_stream_wrappers.c +++ b/dio_stream_wrappers.c @@ -126,12 +126,12 @@ php_stream_ops dio_raw_stream_ops = { * fopen for the dio.raw stream. */ static php_stream *dio_raw_fopen_wrapper(php_stream_wrapper *wrapper, - char *path, char *mode, - int options, char **opened_path, - php_stream_context *context STREAMS_DC TSRMLS_DC) { + const char *path, const char *mode, int options, + zend_string **opened_path, php_stream_context *context STREAMS_DC) +{ php_dio_stream_data *data; php_stream *stream; - char *filename; + const char *filename; /* Check it was actually for us (not a corrupted function pointer somewhere!). */ @@ -287,9 +287,9 @@ php_stream_ops dio_serial_stream_ops = { * fopen for the dio.raw stream. */ static php_stream *dio_serial_fopen_wrapper(php_stream_wrapper *wrapper, - char *path, char *mode, - int options, char **opened_path, - php_stream_context *context STREAMS_DC TSRMLS_DC) { + const char *path, const char *mode, int options, + zend_string **opened_path, php_stream_context *context STREAMS_DC) +{ php_dio_stream_data *data; php_stream *stream; char *filename; diff --git a/dio_win32.c b/dio_win32.c index e7ccedd..1023d36 100644 --- a/dio_win32.c +++ b/dio_win32.c @@ -505,7 +505,7 @@ int dio_common_set_option(php_dio_stream_data *data, int option, int value, void /* {{{ dio_raw_open_stream * Opens the underlying stream. */ -int dio_raw_open_stream(char *filename, char *mode, php_dio_stream_data *data TSRMLS_DC) { +int dio_raw_open_stream(const char *filename, char *mode, php_dio_stream_data *data TSRMLS_DC) { php_dio_win32_stream_data *wdata = (php_dio_win32_stream_data*)data; DWORD err; diff --git a/php_dio_common.h b/php_dio_common.h index 6b14040..7a75370 100644 --- a/php_dio_common.h +++ b/php_dio_common.h @@ -55,7 +55,7 @@ int dio_common_close(php_dio_stream_data *data); int dio_common_set_option(php_dio_stream_data *data, int option, int value, void *ptrparam); -int dio_raw_open_stream(char *filename, char *mode, php_dio_stream_data *data TSRMLS_DC); +int dio_raw_open_stream(const char *filename, char *mode, php_dio_stream_data *data TSRMLS_DC); int dio_serial_uninit(php_dio_stream_data *data); -- 2.5.0

« previous php.pecl.dev (#13862) next »