[librest/tintou/annotations-fixes] Add several missing annotations




commit b6fea0f06a0f30c5aa43bd1381071a763caf0e16
Author: Corentin Noël <corentin noel collabora com>
Date:   Thu Oct 15 11:11:10 2020 +0200

    Add several missing annotations
    
    Most of them are taken from the Vala overrides: 
https://gitlab.gnome.org/GNOME/vala/-/blob/master/vapi/metadata/Rest-0.7.metadata

 rest/rest-params.c     |  9 +++++----
 rest/rest-proxy-call.c | 18 ++++++++++++++----
 2 files changed, 19 insertions(+), 8 deletions(-)
---
diff --git a/rest/rest-params.c b/rest/rest-params.c
index 369215b..f246cc2 100644
--- a/rest/rest-params.c
+++ b/rest/rest-params.c
@@ -79,7 +79,7 @@ rest_params_free (RestParams *params)
 /**
  * rest_params_add:
  * @params: a valid #RestParams
- * @param: a valid #RestParam
+ * @param: (transfer full): a valid #RestParam
  *
  * Add @param to @params.
  **/
@@ -101,7 +101,8 @@ rest_params_add (RestParams *params, RestParam *param)
  *
  * Return the #RestParam called @name, or %NULL if it doesn't exist.
  *
- * Returns: a #RestParam or %NULL if the name doesn't exist
+ * Returns: (transfer none) (nullable): a #RestParam or %NULL if the name
+ * doesn't exist
  **/
 RestParam *
 rest_params_get (RestParams *params, const char *name)
@@ -224,8 +225,8 @@ rest_params_iter_init (RestParamsIter *iter, RestParams *params)
 /**
  * rest_params_iter_next:
  * @iter: an initialized #RestParamsIter
- * @name: a location to store the name, or %NULL
- * @param: a location to store the #RestParam, or %NULL
+ * @name: (out) (optional): a location to store the name, or %NULL
+ * @param: (out) (optional): a location to store the #RestParam, or %NULL
  *
  * Advances @iter and retrieves the name and/or parameter that are now pointed
  * at as a result of this advancement.  If FALSE is returned, @name and @param
diff --git a/rest/rest-proxy-call.c b/rest/rest-proxy-call.c
index 72c8261..2ab722f 100644
--- a/rest/rest-proxy-call.c
+++ b/rest/rest-proxy-call.c
@@ -414,6 +414,15 @@ rest_proxy_call_add_param (RestProxyCall *call,
   rest_params_add (priv->params, param);
 }
 
+/**
+ * rest_proxy_call_add_param_full:
+ * @call: The #RestProxyCall
+ * @param: (transfer full): A #RestParam
+ *
+ * Add a query parameter @param to the call.
+ * If a parameter with this name already exists, the new value will replace the
+ * old.
+ */
 void
 rest_proxy_call_add_param_full (RestProxyCall *call, RestParam *param)
 {
@@ -475,8 +484,9 @@ rest_proxy_call_add_params_from_valist (RestProxyCall *call,
  *
  * Get the value of the parameter called @name.
  *
- * Returns: The parameter value, or %NULL if it does not exist. This string is
- * owned by the #RestProxyCall and should not be freed.
+ * Returns: (transfer none) (nullable): The parameter value, or %NULL if it does
+ * not exist. This string is owned by the #RestProxyCall and should not be
+ * freed.
  */
 RestParam *
 rest_proxy_call_lookup_param (RestProxyCall *call,
@@ -1274,8 +1284,8 @@ rest_proxy_call_lookup_response_header (RestProxyCall *call,
  * rest_proxy_call_get_response_headers:
  * @call: The #RestProxyCall
  *
- * Returns: (transfer container): pointer to a hash table of
- * headers. This hash table must not be changed. You should call
+ * Returns: (transfer container) (element-type utf8 utf8): pointer to a hash
+ * table of headers. This hash table must not be changed. You should call
  * g_hash_table_unref() when you have finished with it.
  */
 GHashTable *


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