[Spice-devel] [PATCH spice-gtk 2/2] channel: deprecate spice_channel_destroy()

Christophe Fergeau cfergeau at redhat.com
Thu Nov 13 01:10:55 PST 2014


Hey,

I've seen your comment saying that this patch is not working as
expected, however I had a comment related to the API doc, see below.

On Sun, Nov 09, 2014 at 10:00:39PM +0100, Marc-André Lureau wrote:
> This function is somewhat useless, and dangerous since it is
> calling g_object_unref() on your back (although this is mention in the
> doc, I consider this a bad practice).
> ---
>  gtk/spice-channel.c | 3 ++-
>  gtk/spice-channel.h | 3 ++-
>  gtk/spice-session.c | 8 ++++----
>  3 files changed, 8 insertions(+), 6 deletions(-)
> 
> diff --git a/gtk/spice-channel.c b/gtk/spice-channel.c
> index 3dd8be3..99850e3 100644
> --- a/gtk/spice-channel.c
> +++ b/gtk/spice-channel.c
> @@ -2038,8 +2038,9 @@ SpiceChannel *spice_channel_new(SpiceSession *s, int type, int id)
>   * spice_channel_destroy:
>   * @channel:
>   *
> - * Disconnect and unref the @channel. Called by @spice_session_channel_destroy()
> + * Disconnect and unref the @channel.
>   *
> + * Deprecated: 0.27: this function has been removed

At first, I thought you meant that this function was no longer available
at all, causing an ABI break. After reading the full patch, it seems you
mean this function has no non-deprecated replacement. Indicating whether
this is because library users should never have called it, or because
it's no longer needed to call it because of XXX or YYY would be helpful
to people who want to get rid of deprecated calls to that method.

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20141113/928fa96d/attachment.sig>


More information about the Spice-devel mailing list