[virt-tools-list] [libvirt-glib] GVirConfigObjct should be abstract

Daniel P. Berrange berrange at redhat.com
Mon Sep 19 09:00:02 UTC 2011


On Fri, Sep 16, 2011 at 07:53:04PM +0300, Zeeshan Ali (Khattak) wrote:
> From: "Zeeshan Ali (Khattak)" <zeeshanak at gnome.org>
> 
> ---
>  libvirt-gconfig/libvirt-gconfig-object.c |   13 +------------
>  libvirt-gconfig/libvirt-gconfig-object.h |    3 ---
>  2 files changed, 1 insertions(+), 15 deletions(-)
> 
> diff --git a/libvirt-gconfig/libvirt-gconfig-object.c b/libvirt-gconfig/libvirt-gconfig-object.c
> index 45d3cf5..358c9e1 100644
> --- a/libvirt-gconfig/libvirt-gconfig-object.c
> +++ b/libvirt-gconfig/libvirt-gconfig-object.c
> @@ -46,8 +46,7 @@ struct _GVirConfigObjectPrivate
>      xmlDocPtr docHandle;
>  };
>  
> -G_DEFINE_TYPE(GVirConfigObject, gvir_config_object, G_TYPE_OBJECT);
> -
> +G_DEFINE_ABSTRACT_TYPE(GVirConfigObject, gvir_config_object, G_TYPE_OBJECT);
>  
>  enum {
>      PROP_0,
> @@ -232,16 +231,6 @@ static void gvir_config_object_init(GVirConfigObject *conn)
>      memset(priv, 0, sizeof(*priv));
>  }
>  
> -
> -GVirConfigObject *gvir_config_object_new(const gchar *doc,
> -                                   const gchar *schema)
> -{
> -    return GVIR_CONFIG_OBJECT(g_object_new(GVIR_TYPE_CONFIG_OBJECT,
> -                                           "doc", doc,
> -                                           "schema", schema,
> -                                           NULL));
> -}
> -
>  static void
>  gvir_config_object_parse(GVirConfigObject *config,
>                           GError **err)
> diff --git a/libvirt-gconfig/libvirt-gconfig-object.h b/libvirt-gconfig/libvirt-gconfig-object.h
> index 81254d6..d08e97d 100644
> --- a/libvirt-gconfig/libvirt-gconfig-object.h
> +++ b/libvirt-gconfig/libvirt-gconfig-object.h
> @@ -59,9 +59,6 @@ struct _GVirConfigObjectClass
>  
>  GType gvir_config_object_get_type(void);
>  
> -GVirConfigObject *gvir_config_object_new(const gchar *doc,
> -                                         const gchar *schema);
> -
>  void gvir_config_object_validate(GVirConfigObject *config,
>                                   GError **err);

ACK

NB, any further patches to libvirt-XXX code should actually go to
libvir-list at redhat.com

Regards,
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 :|




More information about the virt-tools-list mailing list