glib r7727 - in branches/glib-2-18/gio: . tests
- From: matthiasc svn gnome org
- To: svn-commits-list gnome org
- Subject: glib r7727 - in branches/glib-2-18/gio: . tests
- Date: Thu, 4 Dec 2008 04:16:37 +0000 (UTC)
Author: matthiasc
Date: Thu Dec 4 04:16:37 2008
New Revision: 7727
URL: http://svn.gnome.org/viewvc/glib?rev=7727&view=rev
Log:
Fix the build
Modified:
branches/glib-2-18/gio/ChangeLog
branches/glib-2-18/gio/gdatainputstream.c
branches/glib-2-18/gio/tests/data-input-stream.c
Modified: branches/glib-2-18/gio/gdatainputstream.c
==============================================================================
--- branches/glib-2-18/gio/gdatainputstream.c (original)
+++ branches/glib-2-18/gio/gdatainputstream.c Thu Dec 4 04:16:37 2008
@@ -739,7 +739,7 @@
* triggering the cancellable object from another thread. If the operation
* was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
*
- * Returns: a string with the line that was read in (including the newlines).
+ * Returns: a string with the line that was read in (without the newlines).
* Set @length to a #gsize to get the length of the read line. Returns %NULL on an error.
**/
char *
@@ -801,7 +801,7 @@
if (length)
*length = (gsize)found_pos;
g_warn_if_fail (res == found_pos + newline_len);
- line[found_pos + newline_len] = 0;
+ line[found_pos] = 0;
return line;
}
Modified: branches/glib-2-18/gio/tests/data-input-stream.c
==============================================================================
--- branches/glib-2-18/gio/tests/data-input-stream.c (original)
+++ branches/glib-2-18/gio/tests/data-input-stream.c Thu Dec 4 04:16:37 2008
@@ -87,12 +87,8 @@
data = g_data_input_stream_read_line (G_DATA_INPUT_STREAM (stream), &length, NULL, &error);
if (data)
{
- char *expected;
-
- expected = g_strconcat (lines[line], ends[newline_type], NULL);
- g_assert_cmpstr (data, ==, expected);
+ g_assert_cmpstr (data, ==, lines[line]);
g_assert (error == NULL);
- g_free (expected);
line++;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]