Lines Matching refs:self

33 	struct php_gz_stream_data_t *self = (struct php_gz_stream_data_t *) stream->abstract;  in php_gziop_read()  local
37 read = gzread(self->gz_file, buf, count); in php_gziop_read()
39 if (gzeof(self->gz_file)) { in php_gziop_read()
48 struct php_gz_stream_data_t *self = (struct php_gz_stream_data_t *) stream->abstract; in php_gziop_write() local
51 return gzwrite(self->gz_file, (char *) buf, count); in php_gziop_write()
56 struct php_gz_stream_data_t *self = (struct php_gz_stream_data_t *) stream->abstract; in php_gziop_seek() local
58 assert(self != NULL); in php_gziop_seek()
64 *newoffs = gzseek(self->gz_file, offset, whence); in php_gziop_seek()
71 struct php_gz_stream_data_t *self = (struct php_gz_stream_data_t *) stream->abstract; in php_gziop_close() local
75 if (self->gz_file) { in php_gziop_close()
76 ret = gzclose(self->gz_file); in php_gziop_close()
77 self->gz_file = NULL; in php_gziop_close()
79 if (self->stream) { in php_gziop_close()
80 php_stream_close(self->stream); in php_gziop_close()
81 self->stream = NULL; in php_gziop_close()
84 efree(self); in php_gziop_close()
91 struct php_gz_stream_data_t *self = (struct php_gz_stream_data_t *) stream->abstract; in php_gziop_flush() local
93 return gzflush(self->gz_file, Z_SYNC_FLUSH); in php_gziop_flush()
109 struct php_gz_stream_data_t *self; in php_stream_gzopen() local
132 self = emalloc(sizeof(*self)); in php_stream_gzopen()
133 self->stream = innerstream; in php_stream_gzopen()
134 self->gz_file = gzdopen(dup(fd), mode); in php_stream_gzopen()
136 if (self->gz_file) { in php_stream_gzopen()
138 if (zlevel && (Z_OK != gzsetparams(self->gz_file, zval_get_long(zlevel), Z_DEFAULT_STRATEGY))) { in php_stream_gzopen()
142 stream = php_stream_alloc_rel(&php_stream_gzio_ops, self, 0, mode); in php_stream_gzopen()
148 gzclose(self->gz_file); in php_stream_gzopen()
151 efree(self); in php_stream_gzopen()