[libvirt] [libvirt-glib PATCHv2] Fix *_new_from_xml

Christophe Fergeau cfergeau at redhat.com
Tue Jul 24 11:53:55 UTC 2012


On Tue, Jul 24, 2012 at 12:55:52PM +0200, Marc-André Lureau wrote:
> On Tue, Jul 24, 2012 at 12:24 PM, Daniel P. Berrange
> <berrange at redhat.com> wrote:
> > Should we instead be using g_return_if_fail() so you get a dianostic,
> > on the basis that this is programmer mistake ?
> 
> That was my feeling too. Although I think returning NULL is not a real
> problem, especailly if the object implements GInitable.

I was also undecided about using g_return_if_fail or not, it's unclear to
me where the XML we'd pass to _from_xml would come from (programmer VS
user). I'll change it since you both have a preference for programmer error
(probably to g_return_val_if_reached(NULL))

GVirConfigObject does not implement GInitable.

Christophe
-------------- 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/20120724/2380807a/attachment-0001.sig>


More information about the libvir-list mailing list