GNOME Bugzilla – Bug 676776
soup-message-body: Add a soup_buffer_get_as_bytes method
Last modified: 2012-05-24 21:52:40 UTC
See patch. This is meant to be used with the new gio methods that act on streams, and also greatly helps the introspection situation.
Created attachment 214894 [details] [review] soup-message-body: Add a soup_buffer_get_as_bytes method This new method will return a GBytes instance containing the contents of the SoupBuffer.
Review of attachment 214894 [details] [review]: ::: libsoup/soup-message-body.c @@ +313,3 @@ + * @buffer: a #SoupBuffer + * + * Returns: (transfer full) a new #GBytes which has the same content Missing second :
Created attachment 214903 [details] [review] soup-message-body: Add a soup_buffer_get_as_bytes method This new method will return a GBytes instance containing the contents of the SoupBuffer. Prevent a copy.
Comment on attachment 214903 [details] [review] soup-message-body: Add a soup_buffer_get_as_bytes method just two nitpicks: >+ * Returns: (transfer full): a new #GBytes which has the same content >+ * as the #SoupBuffer. Since: 2.40 >+ SoupBuffer *copy; >+ copy = soup_buffer_copy (buffer); put a blank line between declarations and statements
Attachment 214903 [details] pushed as 4ed116e - soup-message-body: Add a soup_buffer_get_as_bytes method