Very many testcases, some GLib tools (resource compiler, etc) and
GApplication were calling g_type_init().
Remove those uses, as they are no longer required.
https://bugzilla.gnome.org/show_bug.cgi?id=686161
These will validate the resulting line, and throw a conversion error.
In practice these will likely be used by bindings, but it's good
for even C apps too that don't want to explode if that text file
they're reading into Pango actually has invalid UTF-8.
https://bugzilla.gnome.org/show_bug.cgi?id=652758
These functions are meant to replace the read_until() flavour, with the
following improvements:
- consistency between the synchronous and asynchronous versions as to
if the separator character is read (it never is).
- support for using a nul byte as a separator character by way of
addition of a length parameter which allows stop_chars to be treated
as a byte array rather than a nul-terminated string.
The read_until() functions are not yet formally deprecated, but a note
has been added to the documentation warning not to use them as they will
be in the future.
This is bug #584284.
==12351== 45,045 bytes in 4,095 blocks are definitely lost in loss record 377 of 380
==12351== at 0x4005BDC: malloc (vg_replace_malloc.c:195)
==12351== by 0x4057094: g_malloc (gmem.c:134)
==12351== by 0x40573DB: g_malloc_n (gmem.c:281)
==12351== by 0x4071ABD: g_strconcat (gstrfuncs.c:315)
==12351== by 0x8049811: test_read_lines (data-input-stream.c:99)
Bug #628331.
==2415== 45,045 bytes in 4,095 blocks are definitely lost in loss record 393 of 399
==2415== at 0x4005BDC: malloc (vg_replace_malloc.c:195)
==2415== by 0x4057094: g_malloc (gmem.c:134)
==2415== by 0x417FC29: g_data_input_stream_read_line (gdatainputstream.c:797)
==2415== by 0x8049874: test_read_lines (data-input-stream.c:111)
==12088== 360 bytes in 40 blocks are definitely lost in loss record 368 of 381
==12088== at 0x4005BDC: malloc (vg_replace_malloc.c:195)
==12088== by 0x4057094: g_malloc (gmem.c:134)
==12088== by 0x417FF4C: g_data_input_stream_read_until (gdatainputstream.c:914)
==12088== by 0x8049B6F: test_read_until (data-input-stream.c:182)
Bug #628331.
==2415== 165 (72 direct, 93 indirect) bytes in 3 blocks are definitely lost in loss record 373 of 399
==2415== at 0x4005BDC: malloc (vg_replace_malloc.c:195)
==2415== by 0x4057094: g_malloc (gmem.c:134)
==2415== by 0x406F2D6: g_slice_alloc (gslice.c:836)
==2415== by 0x406F31B: g_slice_alloc0 (gslice.c:848)
==2415== by 0x403A8A6: g_error_new_literal (gerror.c:117)
==2415== by 0x403AC31: g_set_error_literal (gerror.c:314)
==2415== by 0x417ED29: read_data (gdatainputstream.c:309)
==2415== by 0x417EE9D: g_data_input_stream_read_byte (gdatainputstream.c:344)
==2415== by 0x8049DEC: test_data_array (data-input-stream.c:263)
Bug #628331.
2008-11-28 Matthias Clasen <mclasen@redhat.com>
Bug 547481 – g_data_input_stream_read_line behaves not as stated in
the docs
* gdatainputstream.c (g_data_input_stream_read_line): Behave as
documented and include the line end in the returned string.
Pointed out by Paul Pogonyshev.
* tests/data-input-stream.c: Fix the read_line test to test the
documented behaviour.
svn path=/trunk/; revision=7694