[libvirt] [libvirt-glib 2/2] RFC: Make use of GUINT_TO_POINTER/GPOINTER_TO_UINT

Marc-André Lureau marcandre.lureau at gmail.com
Mon Jul 30 17:09:00 UTC 2012


On Mon, Jul 30, 2012 at 6:30 PM, Zeeshan Ali (Khattak)
<zeeshanak at gnome.org> wrote:
> From: "Zeeshan Ali (Khattak)" <zeeshanak at gnome.org>
>
> We create struct and a free function each time we need to pass a simple
> unsigned integer to an async function. Code can be simplified if we
> don't do that but rather use glib's API to convert to/from uint to
> pointer.
>
> This patch only changes this for one of these functions. I'll change
> other functions when/if there is a consensus on this..

Personally, I prefer consistency with the rest of the async functions,
and I often found myself replacing GUINT_TO_POINTER "trick" with a
real pointer to a structure that can be extended.


-- 
Marc-André Lureau




More information about the libvir-list mailing list