[libvirt] [libvirt-glib] Add annotations for gvir_stream_add_watch{_full}

Christophe Fergeau cfergeau at redhat.com
Thu Dec 15 17:02:32 UTC 2011


Ping?

On Fri, Dec 09, 2011 at 02:21:04PM +0100, Christophe Fergeau wrote:
> This should silence this compile warning:
>   GEN    LibvirtGObject-1.0.gir
> libvirt-gobject-stream.c:603: Warning: LibvirtGObject:
> gvir_stream_add_watch: argument func: Missing (scope) annotation for
> callback without GDestroyNotify (valid: call, async)
> 
> This also adds API documentation for these functions.
> ---
>  libvirt-gobject/libvirt-gobject-stream.c |   26 ++++++++++++++++++++++++++
>  1 files changed, 26 insertions(+), 0 deletions(-)
> 
> diff --git a/libvirt-gobject/libvirt-gobject-stream.c b/libvirt-gobject/libvirt-gobject-stream.c
> index 6d8bbb8..6b75819 100644
> --- a/libvirt-gobject/libvirt-gobject-stream.c
> +++ b/libvirt-gobject/libvirt-gobject-stream.c
> @@ -613,6 +613,18 @@ GSourceFuncs gvir_stream_source_funcs = {
>      .finalize = gvir_stream_source_finalize,
>  };
>  
> +
> +/**
> + * gvir_stream_add_watch: (skip):
> + * @stream: the stream
> + * @cond: the conditions to watch for (bitfield of #GVirStreamIOCondition)
> + * @func: (closure opaque): the function to call when the condition is satisfied
> + * @opaque: (closure): user data to pass to @func
> + *
> + * Adds a watch for @stream to the mainloop
> + *
> + * Returns: the event source id
> + */
>  guint gvir_stream_add_watch(GVirStream *stream,
>                              GVirStreamIOCondition cond,
>                              GVirStreamIOFunc func,
> @@ -626,6 +638,20 @@ guint gvir_stream_add_watch(GVirStream *stream,
>                                        NULL);
>  }
>  
> +/**
> + * gvir_stream_add_watch_full:
> + * @stream: the stream
> + * @priority: the priority of the #GVirStream source
> + * @cond: the conditions to watch for (bitfield of #GVirStreamIOCondition)
> + * @func: (closure opaque): the function to call when the condition is satisfied
> + * @opaque: (closure): user data to pass to @func
> + * @notify: the function to call when the source is removed
> + *
> + * Adds a watch for @stream to the mainloop
> + *
> + * Returns: the event source id
> + * Rename to: gvir_stream_add_watch
> + */
>  guint gvir_stream_add_watch_full(GVirStream *stream,
>                                   gint priority,
>                                   GVirStreamIOCondition cond,
> -- 
> 1.7.7.3
> 
> --
> libvir-list mailing list
> libvir-list at redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20111215/d37211b0/attachment-0001.sig>


More information about the libvir-list mailing list