[libsoup] Add missing array annotations for binary data



commit b24ef29be4ccd9b051d75b15b290448b5490bc53
Author: Evan Nemerson <evan nemerson com>
Date:   Mon May 12 00:46:01 2014 -0700

    Add missing array annotations for binary data
    
    https://bugzilla.gnome.org/show_bug.cgi?id=729987

 libsoup/soup-message-body.c    |    4 ++--
 libsoup/soup-message-headers.c |    3 ++-
 libsoup/soup-socket.c          |    8 +++++---
 3 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/libsoup/soup-message-body.c b/libsoup/soup-message-body.c
index 6a9f81e..006ecea 100644
--- a/libsoup/soup-message-body.c
+++ b/libsoup/soup-message-body.c
@@ -79,7 +79,7 @@ typedef struct {
 /**
  * soup_buffer_new:
  * @use: how @data is to be used by the buffer
- * @data: data
+ * @data: (array length=length) (element-type guint8): data
  * @length: length of @data
  *
  * Creates a new #SoupBuffer containing @length bytes from @data.
@@ -166,7 +166,7 @@ soup_buffer_new_subbuffer (SoupBuffer *parent, gsize offset, gsize length)
 
 /**
  * soup_buffer_new_with_owner:
- * @data: data
+ * @data: (array length=length) (element-type guint8): data
  * @length: length of @data
  * @owner: pointer to an object that owns @data
  * @owner_dnotify: (allow-none): a function to free/unref @owner when
diff --git a/libsoup/soup-message-headers.c b/libsoup/soup-message-headers.c
index dcbecaa..f4a69d4 100644
--- a/libsoup/soup-message-headers.c
+++ b/libsoup/soup-message-headers.c
@@ -958,7 +958,8 @@ soup_message_headers_get_ranges_internal (SoupMessageHeaders  *hdrs,
  * soup_message_headers_get_ranges:
  * @hdrs: a #SoupMessageHeaders
  * @total_length: the total_length of the response body
- * @ranges: (out): return location for an array of #SoupRange
+ * @ranges: (out) (array length=length): return location for an array
+ * of #SoupRange
  * @length: the length of the returned array
  *
  * Parses @hdrs's Range header and returns an array of the requested
diff --git a/libsoup/soup-socket.c b/libsoup/soup-socket.c
index 9d935d3..994d3dc 100644
--- a/libsoup/soup-socket.c
+++ b/libsoup/soup-socket.c
@@ -1726,7 +1726,8 @@ translate_read_status (SoupSocket *sock, GCancellable *cancellable,
 /**
  * soup_socket_read:
  * @sock: the socket
- * @buffer: buffer to read into
+ * @buffer: (array length=len) (element-type guint8): buffer to read
+ *   into
  * @len: size of @buffer in bytes
  * @nread: (out): on return, the number of bytes read into @buffer
  * @cancellable: a #GCancellable, or %NULL
@@ -1791,7 +1792,8 @@ out:
 /**
  * soup_socket_read_until:
  * @sock: the socket
- * @buffer: buffer to read into
+ * @buffer: (array length=len) (element-type guint8): buffer to read
+ *   into
  * @len: size of @buffer in bytes
  * @boundary: boundary to read until
  * @boundary_len: length of @boundary in bytes
@@ -1867,7 +1869,7 @@ socket_write_watch (GObject *pollable, gpointer user_data)
 /**
  * soup_socket_write:
  * @sock: the socket
- * @buffer: data to write
+ * @buffer: (array length=len) (element-type guint8): data to write
  * @len: size of @buffer, in bytes
  * @nwrote: (out): on return, number of bytes written
  * @cancellable: a #GCancellable, or %NULL


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]