summaryrefslogtreecommitdiff
path: root/main/php_streams.h
diff options
context:
space:
mode:
authorWez Furlong <wez@php.net>2002-03-19 23:29:37 +0000
committerWez Furlong <wez@php.net>2002-03-19 23:29:37 +0000
commit7990d742e5fc32d5b1c9c49b7aab2e41acd75d0f (patch)
tree9917162cc0af4701ce0dd7ffc8cdb2dc26181f89 /main/php_streams.h
parent2adf5bea7c00fcf5184a5377ad075dde494305fd (diff)
downloadphp-git-7990d742e5fc32d5b1c9c49b7aab2e41acd75d0f.tar.gz
Improve behaviour of the stream casting operation.
Improve interaction with fopencookie.
Diffstat (limited to 'main/php_streams.h')
-rwxr-xr-xmain/php_streams.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/main/php_streams.h b/main/php_streams.h
index a590c9c94f..98a62286f8 100755
--- a/main/php_streams.h
+++ b/main/php_streams.h
@@ -271,6 +271,11 @@ PHPAPI php_stream *_php_stream_open_wrapper(char *path, char *mode, int options,
PHPAPI int _php_stream_make_seekable(php_stream *origstream, php_stream **newstream, int flags STREAMS_DC TSRMLS_DC);
#define php_stream_make_seekable(origstream, newstream, flags) _php_stream_make_seekable((origstream), (newstream), (flags) STREAMS_CC TSRMLS_CC)
+/* This is a utility API for extensions that are opening a stream, converting it
+ * to a FILE* and then closing it again. Be warned that fileno() on the result
+ * will most likely fail on systems with fopencookie. */
+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)
/* for user-space streams */
extern php_stream_ops php_stream_userspace_ops;