On Thu, May 22, 2008 at 06:40:57PM +0100, Richard W.M. Jones wrote: > This is a pair of patches which deprecate the conn, dom and net fields > in the virterror structure. > > Programs which use these fields will get a warning (if compiled under > gcc anyway): > > foo.c:123: warning: 'dom' is deprecated (declared at /usr/include/libvirt/virterror.h:81) > > The fields themselves are still present and still set, so the ABI > isn't changed. > > Now the patch is quite a lot more involved than you might think for > such a simple change. Part of the problem is that we want to allow > libvirt itself to modify these fields without generating a warning. > > Therefore the first part of the patch has to refactor all code within > libvirt which includes "libvirt.h" or "virterror.h" (the public > headers) so that instead this code just includes "internal.h". > "internal.h" already includes the public headers. This allows > "internal.h" to undefine the deprecation macro. > > Of course nothing is quite so simple. We have two "internal.h" files, > so I renamed the one in the qemud directory to "qemud.h". > > I also added something in the HACKING file, stating how *.c files > within libvirt should include header files. > > The second part of the patch actually adds the deprecation to the > fields in virterror, and hence is small and simple. As indicated on Friday over IRC (my mail was down !) Okay, fine by me. it's a bit frustrating to not be able to give the full extent of the informations we have available because we can't just do the ref counting right, but it's the best way, better to deprecate than risk having the error handling crash Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@xxxxxxxxxx | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ -- Libvir-list mailing list Libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list