Re: GObject introspection



On Mi, 2011-05-11 at 01:28 +0300, Zeeshan Ali (Khattak) wrote:
> Hi,
> 
> On Sun, May 8, 2011 at 11:09 PM, Jens Georg <mail jensge org> wrote:
> > Any ideas on how to clean up that situation?
> >
> > I'd suggest to rename gupnp_device_info_get_service/_get_device to
> > gupnp_device_info_get_service_by_type/_get_device_by_type and make the
> > original ones to convenience wrappers for the vfuncs, which is IIRC a
> > standard GObject convention.
> 
>   I didn't get the 'make the original ones to convenience wrappers for
> the vfuncs' part.

have 
static GUPnPService*
gupnp_device_info_get_service(GUPnPDeviceInfo *self, xmlNode *element) {
	GUPnPDeviceInfoClass *klass = GUPNP_DEVICE_INFO_GET_CLASS(self);

	return klass->get_service (self, element);
}
since those are private virtual functions? I think g-ir-scanner is
modelled after the conventions in
http://developer.gnome.org/gobject/stable/howto-gobject-methods.html and
the situation confuses the hell out of it.

> 
> > Of course this will break ABI and API, so probably not a nice thing to
> > do :-/
> 
>   Yeah, thats unfortunate. Is it possible to tell GIR to ignore the
> virtual functions for now?

I tried with (skip) but it was ignored. I'll try to get some infos on
#introspection.



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