ACK On Tue, Jun 26, 2012 at 05:56:18AM +0300, Zeeshan Ali (Khattak) wrote: > From: "Zeeshan Ali (Khattak)" <zeeshanak@xxxxxxxxx> > > --- > libvirt-gconfig/libvirt-gconfig-capabilities-cpu.c | 30 +++++++++++++------- > libvirt-gconfig/libvirt-gconfig-capabilities-cpu.h | 4 ++- > 2 files changed, 23 insertions(+), 11 deletions(-) > > diff --git a/libvirt-gconfig/libvirt-gconfig-capabilities-cpu.c b/libvirt-gconfig/libvirt-gconfig-capabilities-cpu.c > index e517a20..03d77d6 100644 > --- a/libvirt-gconfig/libvirt-gconfig-capabilities-cpu.c > +++ b/libvirt-gconfig/libvirt-gconfig-capabilities-cpu.c > @@ -37,10 +37,14 @@ struct _GVirConfigCapabilitiesCpuPrivate > > G_DEFINE_TYPE(GVirConfigCapabilitiesCpu, gvir_config_capabilities_cpu, GVIR_CONFIG_TYPE_OBJECT); > > +static GList * > +_gvir_config_capabilities_cpu_get_features(GVirConfigCapabilitiesCpu *cpu); > > static void gvir_config_capabilities_cpu_class_init(GVirConfigCapabilitiesCpuClass *klass) > { > g_type_class_add_private(klass, sizeof(GVirConfigCapabilitiesCpuPrivate)); > + > + klass->get_features = _gvir_config_capabilities_cpu_get_features; > } > > static void gvir_config_capabilities_cpu_init(GVirConfigCapabilitiesCpu *cpu) > @@ -98,16 +102,8 @@ static gboolean add_feature(xmlNodePtr node, gpointer opaque) > return TRUE; > } > > -/** > - * gvir_config_capabilities_cpu_get_features: > - * > - * Gets the features of this CPU. > - * > - * Returns: (element-type LibvirtGConfig.CapabilitiesCpuFeature) (transfer full): > - * a newly allocated #GList of #GVirConfigCapabilitiesCpuFeature. > - */ > -GList * > -gvir_config_capabilities_cpu_get_features(GVirConfigCapabilitiesCpu *cpu) > +static GList * > +_gvir_config_capabilities_cpu_get_features(GVirConfigCapabilitiesCpu *cpu) > { > struct GetFeatureData data; > > @@ -128,6 +124,20 @@ gvir_config_capabilities_cpu_get_features(GVirConfigCapabilitiesCpu *cpu) > } > > /** > + * gvir_config_capabilities_cpu_get_features: > + * > + * Gets the features of this CPU. > + * > + * Returns: (element-type LibvirtGConfig.CapabilitiesCpuFeature) (transfer full): > + * a newly allocated #GList of #GVirConfigCapabilitiesCpuFeature. > + */ > +GList * > +gvir_config_capabilities_cpu_get_features(GVirConfigCapabilitiesCpu *cpu) > +{ > + return GVIR_CONFIG_CAPABILITIES_CPU_GET_CLASS(cpu)->get_features(cpu); > +} > + > +/** > * gvir_config_capabilities_cpu_get_topology: > * > * Gets the topology of the cpu. > diff --git a/libvirt-gconfig/libvirt-gconfig-capabilities-cpu.h b/libvirt-gconfig/libvirt-gconfig-capabilities-cpu.h > index 67fe607..be6c06f 100644 > --- a/libvirt-gconfig/libvirt-gconfig-capabilities-cpu.h > +++ b/libvirt-gconfig/libvirt-gconfig-capabilities-cpu.h > @@ -57,7 +57,9 @@ struct _GVirConfigCapabilitiesCpuClass > { > GVirConfigObjectClass parent_class; > > - gpointer padding[20]; > + GList *(*get_features)(GVirConfigCapabilitiesCpu *cpu); > + > + gpointer padding[19]; > }; > > GType gvir_config_capabilities_cpu_get_type(void); > -- > 1.7.10.4 > > -- > libvir-list mailing list > libvir-list@xxxxxxxxxx > https://www.redhat.com/mailman/listinfo/libvir-list
Attachment:
pgpzorXjJHA7V.pgp
Description: PGP signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list