On Fri, Oct 07, 2011 at 11:41:02AM +0200, Christophe Fergeau wrote: > Now that the parsing is done before creating the object, this > member is no longer useful. Moreover, it's redundant with the ::node > member. Remove it and rely on always having an xmlNodePtr available > to represent the config object. > --- > libvirt-gconfig/libvirt-gconfig-object.c | 30 ------------------------------ > libvirt-gconfig/libvirt-gconfig-object.h | 1 - > libvirt-gconfig/libvirt-gconfig.sym | 1 - > 3 files changed, 0 insertions(+), 32 deletions(-) > > diff --git a/libvirt-gconfig/libvirt-gconfig-object.c b/libvirt-gconfig/libvirt-gconfig-object.c > index 97ac2e3..6fd5473 100644 > --- a/libvirt-gconfig/libvirt-gconfig-object.c > +++ b/libvirt-gconfig/libvirt-gconfig-object.c > @@ -40,7 +40,6 @@ gboolean debugFlag; > > struct _GVirConfigObjectPrivate > { > - gchar *doc; > gchar *schema; > > xmlNodePtr node; > @@ -50,7 +49,6 @@ G_DEFINE_ABSTRACT_TYPE(GVirConfigObject, gvir_config_object, G_TYPE_OBJECT); > > enum { > PROP_0, > - PROP_DOC, > PROP_SCHEMA, > PROP_NODE > }; > @@ -77,10 +75,6 @@ static void gvir_config_object_get_property(GObject *object, > GVirConfigObjectPrivate *priv = conn->priv; > > switch (prop_id) { > - case PROP_DOC: > - g_value_set_string(value, priv->doc); > - break; > - > case PROP_SCHEMA: > g_value_set_string(value, priv->schema); > break; > @@ -103,11 +97,6 @@ static void gvir_config_object_set_property(GObject *object, > GVirConfigObjectPrivate *priv = conn->priv; > > switch (prop_id) { > - case PROP_DOC: > - g_free(priv->doc); > - priv->doc = g_value_dup_string(value); > - break; > - > case PROP_SCHEMA: > g_free(priv->schema); > priv->schema = g_value_dup_string(value); > @@ -138,7 +127,6 @@ static void gvir_config_object_finalize(GObject *object) > > DEBUG("Finalize GVirConfigObject=%p", conn); > > - g_free(priv->doc); > g_free(priv->schema); > > /* FIXME: all objects describing a given XML document will share the > @@ -161,18 +149,6 @@ static void gvir_config_object_class_init(GVirConfigObjectClass *klass) > object_class->set_property = gvir_config_object_set_property; > > g_object_class_install_property(object_class, > - PROP_DOC, > - g_param_spec_string("doc", > - "Doc", > - "The XML document", > - NULL, > - G_PARAM_READABLE | > - G_PARAM_WRITABLE | > - G_PARAM_CONSTRUCT_ONLY | > - G_PARAM_STATIC_NAME | > - G_PARAM_STATIC_NICK | > - G_PARAM_STATIC_BLURB)); > - g_object_class_install_property(object_class, > PROP_SCHEMA, > g_param_spec_string("schema", > "Schema", > @@ -291,12 +267,6 @@ gchar *gvir_config_object_to_xml(GVirConfigObject *config) > return output_doc; > } > > -const gchar *gvir_config_object_get_doc(GVirConfigObject *config) > -{ > - GVirConfigObjectPrivate *priv = config->priv; > - return priv->doc; > -} > - > const gchar *gvir_config_object_get_schema(GVirConfigObject *config) > { > GVirConfigObjectPrivate *priv = config->priv; > diff --git a/libvirt-gconfig/libvirt-gconfig-object.h b/libvirt-gconfig/libvirt-gconfig-object.h > index 5860102..133ca9f 100644 > --- a/libvirt-gconfig/libvirt-gconfig-object.h > +++ b/libvirt-gconfig/libvirt-gconfig-object.h > @@ -64,7 +64,6 @@ void gvir_config_object_validate(GVirConfigObject *config, > > gchar *gvir_config_object_to_xml(GVirConfigObject *config); > > -const gchar *gvir_config_object_get_doc(GVirConfigObject *config); > const gchar *gvir_config_object_get_schema(GVirConfigObject *config); > xmlNodePtr gvir_config_object_get_xml_node(GVirConfigObject *config); > > diff --git a/libvirt-gconfig/libvirt-gconfig.sym b/libvirt-gconfig/libvirt-gconfig.sym > index 94e596e..b67d152 100644 > --- a/libvirt-gconfig/libvirt-gconfig.sym > +++ b/libvirt-gconfig/libvirt-gconfig.sym > @@ -27,7 +27,6 @@ LIBVIRT_GOBJECT_0.0.1 { > gvir_config_object_get_type; > gvir_config_object_error_quark; > gvir_config_object_new; > - gvir_config_object_get_doc; > gvir_config_object_get_schema; > gvir_config_object_get_xml_node; > gvir_config_object_to_xml; ACK 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 :| -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list