diff options
author | Wez Furlong <wez@php.net> | 2002-03-16 14:39:51 +0000 |
---|---|---|
committer | Wez Furlong <wez@php.net> | 2002-03-16 14:39:51 +0000 |
commit | bed04279c3f8ef7dbb3aa0c0543d50f72248cb2c (patch) | |
tree | 7db0b1720fc4d859b4cc95e9ab6af672c7b78cb1 /main/php_streams.h | |
parent | 6abd7c6f93c4ec981219745ac8882d99741fe50b (diff) | |
download | php-git-bed04279c3f8ef7dbb3aa0c0543d50f72248cb2c.tar.gz |
Hopefully fix resource usage so that we have no leaks and don't segfault.
Diffstat (limited to 'main/php_streams.h')
-rwxr-xr-x | main/php_streams.h | 5 |
1 files changed, 3 insertions, 2 deletions
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) |