Mercurial > dovecot > original-hg > dovecot-1.2
diff src/lib/istream-file.c @ 6142:6c0bfc35af03 HEAD
Removed memory pool parameter from iostreams. Default pool was almost always
used, and the stream usually required destroying anyway so it didn't even
make freeing memory easier.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 24 Jul 2007 06:59:56 +0300 |
parents | 834118e5329f |
children | 896cc473c1f0 |
line wrap: on
line diff
--- a/src/lib/istream-file.c Tue Jul 24 06:49:00 2007 +0300 +++ b/src/lib/istream-file.c Tue Jul 24 06:59:56 2007 +0300 @@ -36,7 +36,7 @@ { struct _istream *_stream = (struct _istream *) stream; - p_free(_stream->iostream.pool, _stream->w_buffer); + i_free(_stream->w_buffer); } static ssize_t _read(struct _istream *stream) @@ -159,13 +159,13 @@ return &stream->statbuf; } -struct istream *i_stream_create_file(int fd, pool_t pool, - size_t max_buffer_size, bool autoclose_fd) +struct istream *i_stream_create_file(int fd, size_t max_buffer_size, + bool autoclose_fd) { struct file_istream *fstream; struct stat st; - fstream = p_new(pool, struct file_istream, 1); + fstream = i_new(struct file_istream, 1); fstream->autoclose_fd = autoclose_fd; fstream->istream.iostream.close = _close; @@ -184,5 +184,5 @@ fstream->istream.istream.seekable = TRUE; } - return _i_stream_create(&fstream->istream, pool, fd, 0); + return _i_stream_create(&fstream->istream, fd, 0); }