Commit Graph

10 Commits

Author SHA1 Message Date
Johan Dahlin
30132c44c1 Add a lot of missing annotations 2010-09-24 18:24:41 -03:00
Christian Persch
08924ad147 Plug a mem leak in GConverterOutputStream
==8221== 1,047 (672 direct, 375 indirect) bytes in 28 blocks are definitely lost in loss record 589 of 603
==8221==    at 0x4005BDC: malloc (vg_replace_malloc.c:195)
==8221==    by 0x4057094: g_malloc (gmem.c:134)
==8221==    by 0x406F2D6: g_slice_alloc (gslice.c:836)
==8221==    by 0x406F31B: g_slice_alloc0 (gslice.c:848)
==8221==    by 0x403A8A6: g_error_new_literal (gerror.c:117)
==8221==    by 0x403AC31: g_set_error_literal (gerror.c:314)
==8221==    by 0x80499DC: g_compressor_converter_convert (converter-stream.c:267)
==8221==    by 0x417BF67: g_converter_convert (gconverter.c:174)
==8221==    by 0x417D7F0: g_converter_output_stream_write (gconverteroutputstream.c:428)
==8221==    by 0x41B57DF: g_output_stream_write (goutputstream.c:216)
==8221==    by 0x804A367: test_compressor (converter-stream.c:456)

Bug #628309.
2010-08-30 10:18:30 -04:00
Matthias Clasen
5f1490e94a Fix sparse warnings
These were listed in bug 623955
2010-07-10 17:21:32 -04:00
Ryan Lortie
5b946e0504 gio/: fully remove gioalias hacks 2010-07-07 19:53:22 -04:00
Alexander Larsson
aeb41b56e1 converter streams: make code more readable
The name buffer_availabile was kinda confusing, so its been renamed
to buffer_data_size() to match buffer_data().

Also I added a comment to buffer_ensure_space because its behaviour
wasn't obvious.
2010-06-11 09:59:56 +02:00
Jürg Billeter
6858ab2033 Use correct offset for buffer data in GConverterOutputStream
Otherwise we overwrite already converted data in the case that more
than one call to g_converter_convert is necessary in write() or
flush().

https://bugzilla.gnome.org/show_bug.cgi?id=619945
2010-06-11 09:55:31 +02:00
Jürg Billeter
86592d675f Ensure we always have some target space in GConverterOutputStream
When the converter fills the whole buffer without reading all input,
we need to enlarge the buffer. Otherwise we get an assertion failure
for `outbuf_size > 0' in g_converter_convert.

https://bugzilla.gnome.org/show_bug.cgi?id=619945
2010-06-11 09:55:23 +02:00
Matthias Clasen
8907bfee86 Fix up GIO docs 2009-11-29 22:54:16 -05:00
Paolo Borelli
e7992b7b06 Fix return type of g_converter_[in|out]put_stream.
Fixes bug #603265
2009-11-29 15:14:10 +01:00
Alexander Larsson
7f8991596b Add GConverterOutputStream
This allows for conversion when saving
2009-11-23 16:22:52 +01:00