Merge branch 'release'
[notmuch] / util / gmime-extra.c
1 #include "gmime-extra.h"
2
3 GMimeStream *
4 g_mime_stream_stdout_new()
5 {
6     GMimeStream *stream_stdout = NULL;
7     GMimeStream *stream_buffered = NULL;
8
9     stream_stdout = g_mime_stream_pipe_new (STDOUT_FILENO);
10     if (!stream_stdout)
11         return NULL;
12
13     g_mime_stream_pipe_set_owner (GMIME_STREAM_PIPE (stream_stdout), FALSE);
14
15     stream_buffered = g_mime_stream_buffer_new (stream_stdout, GMIME_STREAM_BUFFER_BLOCK_WRITE);
16
17     g_object_unref (stream_stdout);
18
19     return stream_buffered;
20 }