diff src/lib/istream-data.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 c44bb2b3994d
children 6a64e64fa3a3
line wrap: on
line diff
--- a/src/lib/istream-data.c	Tue Jul 24 06:49:00 2007 +0300
+++ b/src/lib/istream-data.c	Tue Jul 24 06:59:56 2007 +0300
@@ -24,12 +24,11 @@
 	stream->istream.v_offset = v_offset;
 }
 
-struct istream *i_stream_create_from_data(pool_t pool, const void *data,
-					  size_t size)
+struct istream *i_stream_create_from_data(const void *data, size_t size)
 {
 	struct _istream *stream;
 
-	stream = p_new(pool, struct _istream, 1);
+	stream = i_new(struct _istream, 1);
 	stream->buffer = data;
 	stream->pos = size;
 
@@ -41,7 +40,7 @@
 
 	stream->istream.blocking = TRUE;
 	stream->istream.seekable = TRUE;
-	(void)_i_stream_create(stream, pool, -1, 0);
+	(void)_i_stream_create(stream, -1, 0);
 	stream->statbuf.st_size = size;
 	return &stream->istream;
 }