From bed04279c3f8ef7dbb3aa0c0543d50f72248cb2c Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sat, 16 Mar 2002 14:39:51 +0000 Subject: Hopefully fix resource usage so that we have no leaks and don't segfault. --- main/php_streams.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'main/php_streams.h') diff --git a/main/php_streams.h b/main/php_streams.h index 7ec7f6f6f7..65a83c8036 100755 --- a/main/php_streams.h +++ b/main/php_streams.h @@ -43,7 +43,7 @@ typedef struct _php_stream_ops { /* stdio like functions - these are mandatory! */ size_t (*write)(php_stream *stream, const char *buf, size_t count); size_t (*read)(php_stream *stream, char *buf, size_t count); - int (*close)(php_stream *stream); + int (*close)(php_stream *stream, int close_handle); int (*flush)(php_stream *stream); /* these are optional */ int (*seek)(php_stream *stream, off_t offset, int whence); @@ -132,7 +132,8 @@ PHPAPI php_stream *php_stream_fopen_temporary_file(const char *dir, const char * /* try really, really hard to make sure the cast happens (socketpair) */ #define PHP_STREAM_CAST_TRY_HARD 0x80000000 - +#define PHP_STREAM_CAST_RELEASE 0x40000000 /* stream becomes invalid on success */ +#define PHP_STREAM_CAST_MASK (PHP_STREAM_CAST_TRY_HARD | PHP_STREAM_CAST_RELEASE) PHPAPI int php_stream_cast(php_stream *stream, int castas, void **ret, int show_err); /* use this to check if a stream can be cast into another form */ #define php_stream_can_cast(stream, as) php_stream_cast(stream, as, NULL, 0) -- cgit v1.2.1