[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [libvirt-glib 04/23] Add GVirConfigObject::node property



On Tue, Oct 18, 2011 at 02:43:10PM +0200, Christophe Fergeau wrote:
> On Tue, Oct 18, 2011 at 12:32:33PM +0100, Daniel P. Berrange wrote:
> > On Fri, Oct 07, 2011 at 11:40:49AM +0200, Christophe Fergeau wrote:
> > > @@ -277,6 +306,8 @@ const gchar *gvir_config_object_get_schema(GVirConfigObject *config)
> > >  }
> > >  
> > >  /* NB: the xmlDocPtr must not be freed by the caller */
> > > +/* gupnp has wrapped xmlDoc in a gobject */
> > > +/* not really useful, can be obtained from xmlNode::doc */
> > 
> > I guess the reason for doing that would be to avoid any libxml2 data
> > types in the public API. Might be worth considering in the future.
> 
> Ah, I hadn't thought of this reason, but at the same time I was wondering
> if it's ok to leak libxml2 data types in the public API. The reason I'm
> considering it is to get refcounting on xmlDocPtr as you mentioned in a
> later patch in this series.

Generally my preference would be to avoid leaking non-GObject based
types in the public API. I don't feel too strongly about libxml2
though, since it has a proven long term stable API that isn't going
to break every 6 months like some libraries do.


Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]