On Tue, Jan 03, 2012 at 08:47:02PM +0200, Zeeshan Ali (Khattak) wrote: > > So FWIW I found the patch in Boxes that causes a problem with current API: > > https://bugzilla.gnome.org/attachment.cgi?id=204140&action=edit > > Compiling that patch should lead you to this: > > vm-configurator.c: In function ‘boxes_vm_configurator_set_video_config’: > vm-configurator.c:713:62: error: ‘GVIR_TYPE_DOMAIN_VIDEO_MODEL’ > undeclared (first use in this function) > vm-configurator.c:713:62: note: each undeclared identifier is reported > only once for each function it appears in > vm-configurator.c: In function ‘boxes_vm_configurator_set_sound_config’: > vm-configurator.c:758:62: error: ‘GVIR_TYPE_DOMAIN_SOUND_MODEL’ > undeclared (first use in this function) > vm-configurator.c: In function ‘boxes_vm_configurator_set_tablet_config’: > vm-configurator.c:804:62: error: ‘GVIR_TYPE_DOMAIN_INPUT_BUS’ > undeclared (first use in this function) Ah great, thanks! At first I thought your patch was just about making things cleaner, so I was a bit surprised that you mentioned issues with vala just now. And having a clear problem to think about really helps to focus rather than " I promise you, I've seen some problem once, but I forgot all the details" The issue comes from typeof(GVirConfig.DomainVideoModel). Vala wants to change this to GVIR_TYPE_CONFIG_DOMAIN_VIDEO_MODEL but it doesn't really have a way of getting this right (I couldn't find an obvious way of getting this name from the .gir) so it ends up with GVIR_TYPE_DOMAIN_VIDEO_MODEL which doesn't exist. However, the .gir has: <enumeration name="DomainVideoModel" glib:type-name="GVirConfigDomainVideoModel" glib:get-type="gvir_config_domain_video_model_get_type" c:type="GVirConfigDomainVideoModel"> My feeling is that there would be less magic involved on the Vala side if it were to use the value of the glib:get-type attribute instead of trying to build a GVIR_TYPE_DOMAIN_VIDEO_MODEL symbol, but it may have very good reasons for doing things the way it does. Then I'm not saying because of what is above, your patch is not needed, it's just me trying to understand what kind of breakage we have because of the unusual namespacing. Christophe
Attachment:
pgpz16onNA0Bg.pgp
Description: PGP signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list