summaryrefslogtreecommitdiff
path: root/ext/zlib/zlib_fopen_wrapper.c
diff options
context:
space:
mode:
authorWez Furlong <wez@php.net>2002-03-18 18:54:32 +0000
committerWez Furlong <wez@php.net>2002-03-18 18:54:32 +0000
commitc9d5e137380893c2608ebe4aefeb46026d5efcef (patch)
tree898f5a7e8894a9fe9f9fdbb0a0fa8080bebbbc72 /ext/zlib/zlib_fopen_wrapper.c
parent41c1c084953a6a5024c56df2b79bcb1fad820633 (diff)
downloadphp-git-c9d5e137380893c2608ebe4aefeb46026d5efcef.tar.gz
TSRMLS related work on streams, as discussed with Zeev.
# Should be the last "broad" commit for a while # Don't forget to make clean ; make
Diffstat (limited to 'ext/zlib/zlib_fopen_wrapper.c')
-rw-r--r--ext/zlib/zlib_fopen_wrapper.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/ext/zlib/zlib_fopen_wrapper.c b/ext/zlib/zlib_fopen_wrapper.c
index a3853074d6..49283982b9 100644
--- a/ext/zlib/zlib_fopen_wrapper.c
+++ b/ext/zlib/zlib_fopen_wrapper.c
@@ -28,7 +28,7 @@ struct php_gz_stream_data_t {
php_stream *stream;
};
-static size_t php_gziop_read(php_stream *stream, char *buf, size_t count)
+static size_t php_gziop_read(php_stream *stream, char *buf, size_t count TSRMLS_DC)
{
struct php_gz_stream_data_t *self = (struct php_gz_stream_data_t *)stream->abstract;
@@ -41,33 +41,33 @@ static size_t php_gziop_read(php_stream *stream, char *buf, size_t count)
return gzread(self->gz_file, buf, count);
}
-static char *php_gziop_gets(php_stream *stream, char *buf, size_t size)
+static char *php_gziop_gets(php_stream *stream, char *buf, size_t size TSRMLS_DC)
{
struct php_gz_stream_data_t *self = (struct php_gz_stream_data_t *)stream->abstract;
return gzgets(self->gz_file, buf, size);
}
-static size_t php_gziop_write(php_stream *stream, const char *buf, size_t count)
+static size_t php_gziop_write(php_stream *stream, const char *buf, size_t count TSRMLS_DC)
{
struct php_gz_stream_data_t *self = (struct php_gz_stream_data_t *)stream->abstract;
return gzwrite(self->gz_file, (char*)buf, count);
}
-static int php_gziop_seek(php_stream *stream, off_t offset, int whence)
+static int php_gziop_seek(php_stream *stream, off_t offset, int whence TSRMLS_DC)
{
struct php_gz_stream_data_t *self = (struct php_gz_stream_data_t *)stream->abstract;
return gzseek(self->gz_file, offset, whence);
}
-static int php_gziop_close(php_stream *stream, int close_handle)
+static int php_gziop_close(php_stream *stream, int close_handle TSRMLS_DC)
{
struct php_gz_stream_data_t *self = (struct php_gz_stream_data_t *)stream->abstract;
int ret = EOF;
if (close_handle)
ret = gzclose(self->gz_file);
- php_stream_free(self->stream, close_handle);
+ php_stream_free(self->stream, PHP_STREAM_FREE_CLOSE | (close_handle == 0 ? PHP_STREAM_FREE_PRESERVE_HANDLE : 0));
efree(self);
return ret;
@@ -80,7 +80,7 @@ php_stream_ops php_stream_gzio_ops = {
NULL, "ZLIB"
};
-php_stream *php_stream_gzopen(char *path, char *mode, int options, char **opened_path STREAMS_DC)
+php_stream *php_stream_gzopen(char *path, char *mode, int options, char **opened_path STREAMS_DC TSRMLS_DC)
{
struct php_gz_stream_data_t *self;
php_stream *stream = NULL;