After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 688931 - GMemoryOutputStream: Add new _resizable() constructor usable from bindings
GMemoryOutputStream: Add new _resizable() constructor usable from bindings
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks: 688932
 
 
Reported: 2012-11-23 12:41 UTC by Colin Walters
Modified: 2012-11-28 01:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GMemoryOutputStream: Add new _resizable() constructor usable from bindings (4.26 KB, patch)
2012-11-23 12:41 UTC, Colin Walters
committed Details | Review

Description Colin Walters 2012-11-23 12:41:51 UTC
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.
Comment 1 Colin Walters 2012-11-23 12:41:54 UTC
Created attachment 229721 [details] [review]
GMemoryOutputStream: Add new _resizable() constructor usable from bindings
Comment 2 Dan Winship 2012-11-26 19:10:43 UTC
Comment on attachment 229721 [details] [review]
GMemoryOutputStream: Add new _resizable() constructor usable from bindings

makes sense to me
Comment 3 Colin Walters 2012-11-27 21:56:39 UTC
(In reply to comment #2)
> (From update of attachment 229721 [details] [review])
> makes sense to me

Procedural question: You tagged this 'reviewed', but no comments; does that mean 'accepted-commit-now'?  Or waiting for a +1 from another GLib hacker?
Comment 4 Dan Winship 2012-11-27 22:56:41 UTC
It means you get to decide what it means. I didn't want to a-c-n a patch in code that I don't know that well that was posted on a holiday, such that some people might not even have seen the bug yet.
Comment 5 Matthias Clasen 2012-11-28 00:10:57 UTC
even though it is another example of 1-line-wrapper around existing api, the bindings argument makes sense
Comment 6 Colin Walters 2012-11-28 01:51:25 UTC
Attachment 229721 [details] pushed as ed5c17e - GMemoryOutputStream: Add new _resizable() constructor usable from bindings