<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/glib.git/gio/tests/memory-output-stream.c, branch require-python34</title>
<subtitle>gitlab.gnome.org: GNOME/glib.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glib.git/'/>
<entry>
<title>Expand the truncate tests</title>
<updated>2013-12-16T02:07:12+00:00</updated>
<author>
<name>Matthias Clasen</name>
<email>mclasen@redhat.com</email>
</author>
<published>2013-12-16T02:06:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glib.git/commit/?id=5ccdf2b86a7ecb2def51cbf7fcd7318ad20a6cc9'/>
<id>5ccdf2b86a7ecb2def51cbf7fcd7318ad20a6cc9</id>
<content type='text'>
Check that the data is expanded with zeros.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Check that the data is expanded with zeros.
</pre>
</div>
</content>
</entry>
<entry>
<title>gio: Update GMemoryOutputStream length after truncate</title>
<updated>2013-12-15T16:54:39+00:00</updated>
<author>
<name>Ross Lagerwall</name>
<email>rosslagerwall@gmail.com</email>
</author>
<published>2013-12-08T20:41:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glib.git/commit/?id=3b9ad6e6ef030cd8487f165e8d81174bd82e4fb9'/>
<id>3b9ad6e6ef030cd8487f165e8d81174bd82e4fb9</id>
<content type='text'>
For GMemoryOutputStream, update valid_len when truncating so that
g_memory_output_stream_get_data_size () returns the correct result.

https://bugzilla.gnome.org/show_bug.cgi?id=720080
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For GMemoryOutputStream, update valid_len when truncating so that
g_memory_output_stream_get_data_size () returns the correct result.

https://bugzilla.gnome.org/show_bug.cgi?id=720080
</pre>
</div>
</content>
</entry>
<entry>
<title>gio/tests/memory-output-stream.c: Avoid an uninitialized variable</title>
<updated>2013-11-27T00:01:47+00:00</updated>
<author>
<name>Chun-wei Fan</name>
<email>fanchunwei@src.gnome.org</email>
</author>
<published>2013-11-15T05:00:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glib.git/commit/?id=b9322bf9abe2e61718b2b1c57aa09b18946a2d35'/>
<id>b9322bf9abe2e61718b2b1c57aa09b18946a2d35</id>
<content type='text'>
Be a little bit more careful in regards to initializing a primitive type
variable before passing it by reference, as it could have random stuff
in the variable's address depending on the CRT, such as MSVCR110.DLL,
causing random, invalid stuff being written in that address.

This will fix this test when built with Visual Studio 2012.

https://bugzilla.gnome.org/show_bug.cgi?id=711047
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Be a little bit more careful in regards to initializing a primitive type
variable before passing it by reference, as it could have random stuff
in the variable's address depending on the CRT, such as MSVCR110.DLL,
causing random, invalid stuff being written in that address.

This will fix this test when built with Visual Studio 2012.

https://bugzilla.gnome.org/show_bug.cgi?id=711047
</pre>
</div>
</content>
</entry>
<entry>
<title>GMemoryOutputStream: improve seek tests</title>
<updated>2013-10-23T15:32:13+00:00</updated>
<author>
<name>Ryan Lortie</name>
<email>desrt@desrt.ca</email>
</author>
<published>2013-10-22T20:15:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glib.git/commit/?id=1d1c17d9ee69ece6c28da0544d12a29b1c3e4dc9'/>
<id>1d1c17d9ee69ece6c28da0544d12a29b1c3e4dc9</id>
<content type='text'>
Improve test coverage for testing seeking on fixed vs. resizable
GMemoryOutputStream.

https://bugzilla.gnome.org/show_bug.cgi?id=684842
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Improve test coverage for testing seeking on fixed vs. resizable
GMemoryOutputStream.

https://bugzilla.gnome.org/show_bug.cgi?id=684842
</pre>
</div>
</content>
</entry>
<entry>
<title>Change semantics of seek on memory output stream</title>
<updated>2013-10-23T15:31:27+00:00</updated>
<author>
<name>Ryan Lortie</name>
<email>desrt@desrt.ca</email>
</author>
<published>2013-10-23T15:25:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glib.git/commit/?id=fdc5cd8d9fcf9ac8c0ebe27cf6cd3c8648690a8b'/>
<id>fdc5cd8d9fcf9ac8c0ebe27cf6cd3c8648690a8b</id>
<content type='text'>
It is our intention that memory output streams should operate in two
distinct modes, depending on if a realloc function was provided or not.

In the case that we have a realloc function (resizable mode), we want
the stream to behave as if it were a file that started out empty.  In
the case that we don't have a realloc function (fixed-sized mode), we
want the stream to behave as a block device would.

To this end, we introduce two changes in functionality:

 - seeking to SEEK_END on a resizable stream will now seek to the end of
   the valid data region, not to the end of the allocated memory (which
   is really just an implementation detail)

 - seeks past the end of the allocated memory size are now permitted,
   but only on resizable streams.  The next write will grow the buffer
   (inserting zeros between).

Some tweaks to testcases were required in order not to break the build,
which indicates that this is an API break, but it seems unlikely that
anyone will be effected by these changes 'in the real world'.

Updates to documentation and further testcases are in following commits.

Based on a patch from Maciej Piechotka &lt;uzytkownik2@gmail.com&gt;.

https://bugzilla.gnome.org/show_bug.cgi?id=684842
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It is our intention that memory output streams should operate in two
distinct modes, depending on if a realloc function was provided or not.

In the case that we have a realloc function (resizable mode), we want
the stream to behave as if it were a file that started out empty.  In
the case that we don't have a realloc function (fixed-sized mode), we
want the stream to behave as a block device would.

To this end, we introduce two changes in functionality:

 - seeking to SEEK_END on a resizable stream will now seek to the end of
   the valid data region, not to the end of the allocated memory (which
   is really just an implementation detail)

 - seeks past the end of the allocated memory size are now permitted,
   but only on resizable streams.  The next write will grow the buffer
   (inserting zeros between).

Some tweaks to testcases were required in order not to break the build,
which indicates that this is an API break, but it seems unlikely that
anyone will be effected by these changes 'in the real world'.

Updates to documentation and further testcases are in following commits.

Based on a patch from Maciej Piechotka &lt;uzytkownik2@gmail.com&gt;.

https://bugzilla.gnome.org/show_bug.cgi?id=684842
</pre>
</div>
</content>
</entry>
<entry>
<title>Improve test coverage a bit</title>
<updated>2013-06-01T22:51:25+00:00</updated>
<author>
<name>Matthias Clasen</name>
<email>mclasen@redhat.com</email>
</author>
<published>2013-06-01T04:36:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glib.git/commit/?id=fed8ae38c3b43c8da693c624bb552c50d269af84'/>
<id>fed8ae38c3b43c8da693c624bb552c50d269af84</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>GMemoryOutputStream: Add new _resizable() constructor usable from bindings</title>
<updated>2012-11-28T01:45:21+00:00</updated>
<author>
<name>Colin Walters</name>
<email>walters@verbum.org</email>
</author>
<published>2012-11-22T13:23:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glib.git/commit/?id=ed5c17e11f3b37b0725e1ca2f62511338fa23f1b'/>
<id>ed5c17e11f3b37b0725e1ca2f62511338fa23f1b</id>
<content type='text'>
Really, the memory output stream API is too warped around the model
where it's a fixed size buffer that you've already allocated.  Even in
C, I find myself always wanting to use it to just accumulate data into
an arbitrary-sized buffer it allocates.

Unfortunately, it's also not usable from bindings because it's not
common to bind g_free() and g_realloc(), but if you just pass NULL, you
get the default of a fixed size, which is useless as per above.

I am going to use this from a gjs test case, and the GSubprocess test
cases also will use it.

https://bugzilla.gnome.org/show_bug.cgi?id=688931
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Really, the memory output stream API is too warped around the model
where it's a fixed size buffer that you've already allocated.  Even in
C, I find myself always wanting to use it to just accumulate data into
an arbitrary-sized buffer it allocates.

Unfortunately, it's also not usable from bindings because it's not
common to bind g_free() and g_realloc(), but if you just pass NULL, you
get the default of a fixed size, which is useless as per above.

I am going to use this from a gjs test case, and the GSubprocess test
cases also will use it.

https://bugzilla.gnome.org/show_bug.cgi?id=688931
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove g_type_init() calls</title>
<updated>2012-10-16T13:39:24+00:00</updated>
<author>
<name>Ryan Lortie</name>
<email>desrt@desrt.ca</email>
</author>
<published>2012-10-15T16:00:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glib.git/commit/?id=1dc774a653e992e1153fbed16f90097fa8db467f'/>
<id>1dc774a653e992e1153fbed16f90097fa8db467f</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>gio: add GBytes-based input/output stream methods</title>
<updated>2012-05-24T21:48:13+00:00</updated>
<author>
<name>Dan Winship</name>
<email>danw@gnome.org</email>
</author>
<published>2012-04-05T13:19:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glib.git/commit/?id=800d6ff1115b27bf0e9cce818a0511048e2f1cc5'/>
<id>800d6ff1115b27bf0e9cce818a0511048e2f1cc5</id>
<content type='text'>
Using a caller-supplied buffer for g_input_stream_read() doesn't
translate well to the semantics of many other languages, and using a
non-refcounted buffer for read_async() and write_async() makes it
impossible to manage the memory correctly currently in
garbage-collected languages.

Fix both of these issues by adding a new set of methods that work with
GBytes objects rather than plain buffers.

https://bugzilla.gnome.org/show_bug.cgi?id=671139
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Using a caller-supplied buffer for g_input_stream_read() doesn't
translate well to the semantics of many other languages, and using a
non-refcounted buffer for read_async() and write_async() makes it
impossible to manage the memory correctly currently in
garbage-collected languages.

Fix both of these issues by adding a new set of methods that work with
GBytes objects rather than plain buffers.

https://bugzilla.gnome.org/show_bug.cgi?id=671139
</pre>
</div>
</content>
</entry>
<entry>
<title>GMemoryOutputStream: Add API to return data as a GBytes</title>
<updated>2012-05-21T17:45:15+00:00</updated>
<author>
<name>Colin Walters</name>
<email>walters@verbum.org</email>
</author>
<published>2012-05-18T14:39:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glib.git/commit/?id=44d4990442532dd067ca670a3a4b18109ee6b02c'/>
<id>44d4990442532dd067ca670a3a4b18109ee6b02c</id>
<content type='text'>
Matches the corresponding additions to GMemoryInputStream.

https://bugzilla.gnome.org/show_bug.cgi?id=672102
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Matches the corresponding additions to GMemoryInputStream.

https://bugzilla.gnome.org/show_bug.cgi?id=672102
</pre>
</div>
</content>
</entry>
</feed>
