cvs: php4(PHP_4_3) /main php_streams.h streams.c

From: Date: Wed, 21 May 2003 10:19:03 +0000
Subject: cvs: php4(PHP_4_3) /main php_streams.h streams.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-21170@lists.php.net to get a copy of this message
zeev Wed May 21 06:19:03 2003 EDT Modified files: (Branch: PHP_4_3) /php4/main php_streams.h streams.c Log: Remove php_stream_open_wrapper_as_file_handle, it was fd-patch specific Index: php4/main/php_streams.h diff -u php4/main/php_streams.h:1.61.2.12 php4/main/php_streams.h:1.61.2.13 --- php4/main/php_streams.h:1.61.2.12 Tue May 13 19:09:27 2003 +++ php4/main/php_streams.h Wed May 21 06:19:03 2003 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_streams.h,v 1.61.2.12 2003/05/13 23:09:27 sas Exp $ */ +/* $Id: php_streams.h,v 1.61.2.13 2003/05/21 10:19:03 zeev Exp $ */ #ifndef PHP_STREAMS_H #define PHP_STREAMS_H @@ -553,9 +553,6 @@ PHPAPI FILE * _php_stream_open_wrapper_as_file(char * path, char * mode, int options, char **opened_path STREAMS_DC TSRMLS_DC); #define php_stream_open_wrapper_as_file(path, mode, options, opened_path) _php_stream_open_wrapper_as_file((path), (mode), (options), (opened_path) STREAMS_CC TSRMLS_CC) - -PHPAPI zend_bool _php_stream_open_wrapper_as_file_handle(char * path, char * mode, int options, zend_file_handle * STREAMS_DC TSRMLS_DC); -#define php_stream_open_wrapper_as_file_handle(path, mode, options, fh) _php_stream_open_wrapper_as_file_handle((path), (mode), (options), (fh) STREAMS_CC TSRMLS_CC) /* for user-space streams */ PHPAPI extern php_stream_ops php_stream_userspace_ops; Index: php4/main/streams.c diff -u php4/main/streams.c:1.125.2.62 php4/main/streams.c:1.125.2.63 --- php4/main/streams.c:1.125.2.62 Tue May 20 16:47:39 2003 +++ php4/main/streams.c Wed May 21 06:19:03 2003 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: streams.c,v 1.125.2.62 2003/05/20 20:47:39 wez Exp $ */ +/* $Id: streams.c,v 1.125.2.63 2003/05/21 10:19:03 zeev Exp $ */ #define _GNU_SOURCE #include "php.h" @@ -2725,45 +2725,6 @@ -/* {{{ php_stream_open_wrapper_as_file_handle */ -PHPAPI zend_bool _php_stream_open_wrapper_as_file_handle(char *path, char *mode, int options, zend_file_handle *fh STREAMS_DC TSRMLS_DC) -{ - php_stream *stream = NULL; - int is_sock = 0; - - stream = php_stream_open_wrapper_rel(path, mode, options|STREAM_WILL_CAST, &fh->opened_path); - - if (stream == NULL) - return FAILURE; - - if ((options & STREAM_OPEN_FOR_INCLUDE) - && php_stream_is(stream, PHP_STREAM_IS_SOCKET)) { - is_sock = 1; - } - - if (php_stream_can_cast(stream, PHP_STREAM_AS_FD) == SUCCESS && - php_stream_cast(stream, PHP_STREAM_AS_FD | PHP_STREAM_CAST_TRY_HARD - | PHP_STREAM_CAST_RELEASE, (void **) &fh->handle.fd, - REPORT_ERRORS) == SUCCESS) { - if (is_sock) { - fh->type = ZEND_HANDLE_SOCKET_FD; - } else { - fh->type = ZEND_HANDLE_FD; - } - } else if (php_stream_cast(stream, PHP_STREAM_AS_STDIO - |PHP_STREAM_CAST_TRY_HARD | PHP_STREAM_CAST_RELEASE, - (void**) &fh->handle.fp, REPORT_ERRORS) == SUCCESS) { - fh->type = ZEND_HANDLE_FP; - } else { - php_stream_close(stream); - if (fh->opened_path) - efree(fh->opened_path); - fh->opened_path = NULL; - return FAILURE; - } - return SUCCESS; -} -/* }}} */ /* {{{ php_stream_make_seekable */ PHPAPI int _php_stream_make_seekable(php_stream *origstream, php_stream **newstream, int flags STREAMS_DC TSRMLS_DC)

« previous php.cvs (#21170) next »