diff options
-rw-r--r-- | libmm-glib/mm-modem-3gpp.c | 7 | ||||
-rw-r--r-- | libmm-glib/mm-pco.c | 6 | ||||
-rw-r--r-- | libmm-glib/mm-pco.h | 7 |
3 files changed, 15 insertions, 5 deletions
diff --git a/libmm-glib/mm-modem-3gpp.c b/libmm-glib/mm-modem-3gpp.c index f8e6787a..03600c22 100644 --- a/libmm-glib/mm-modem-3gpp.c +++ b/libmm-glib/mm-modem-3gpp.c @@ -353,10 +353,9 @@ mm_modem_3gpp_get_eps_ue_mode_operation (MMModem3gpp *self) * * Get the list of #MMPco received from the network. * - * The caller is responsible for freeing the returned #GList with - * mm_pco_list_free(). - * - * Returns: (element-type ModemManager.Pco) (transfer full): A list of #MMPco. + * Returns: (transfer full) (element-type ModemManager.Pco): a list of #MMPco + * objects, or #NULL if @error is set. The returned value should be freed with + * g_list_free_full() using g_object_unref() as #GDestroyNotify function. * * Since: 1.10 */ diff --git a/libmm-glib/mm-pco.c b/libmm-glib/mm-pco.c index 0fc8d291..581761a1 100644 --- a/libmm-glib/mm-pco.c +++ b/libmm-glib/mm-pco.c @@ -246,6 +246,8 @@ mm_pco_to_variant (MMPco *self) /*****************************************************************************/ +#ifndef MM_DISABLE_DEPRECATED + /** * mm_pco_list_free: * @pco_list: (transfer full)(element-type ModemManager.Pco): a #GList of @@ -254,6 +256,8 @@ mm_pco_to_variant (MMPco *self) * Frees all of the memory used by a #GList of #MMPco. * * Since: 1.10 + * Deprecated: 1.12.0: Use g_list_free_full() using g_object_unref() as + * #GDestroyNotify function instead. */ void mm_pco_list_free (GList *pco_list) @@ -261,6 +265,8 @@ mm_pco_list_free (GList *pco_list) g_list_free_full (pco_list, g_object_unref); } +#endif /* MM_DISABLE_DEPRECATED */ + /** * mm_pco_list_add: (skip) */ diff --git a/libmm-glib/mm-pco.h b/libmm-glib/mm-pco.h index 95b9ec16..7e7d4e56 100644 --- a/libmm-glib/mm-pco.h +++ b/libmm-glib/mm-pco.h @@ -64,7 +64,12 @@ gboolean mm_pco_is_complete (MMPco *self); const guint8 *mm_pco_get_data (MMPco *self, gsize *data_size); -void mm_pco_list_free (GList *pco_list); +#ifndef MM_DISABLE_DEPRECATED + +G_DEPRECATED +void mm_pco_list_free (GList *pco_list); + +#endif /*****************************************************************************/ /* ModemManager/libmm-glib/mmcli specific methods */ |