Re: [Vala] [PATCH] Belongs_to and is_instance for vapigen
- From: tecywiz121 <tecywiz121 hotmail com>
- To: Evan Nemerson <evan coeus-group com>
- Cc: vala-devel-list gnome org
- Subject: Re: [Vala] [PATCH] Belongs_to and is_instance for vapigen
- Date: Mon, 4 Oct 2010 12:07:12 -0400
On Sun, 2010-10-03 at 21:05 -0700, Evan Nemerson wrote:
> On Fri, 2010-10-01 at 22:49 -0400, tecywiz121 wrote:
> > On Tue, 2010-09-28 at 10:15 -0700, Evan Nemerson wrote:
> > > On Mon, 2010-09-27 at 17:34 -0400, tecywiz121 wrote:
> > > > Hello vala developers!
> > > >
> > > > I updated my old patch adding belongs_to and is_instance options to
> > > > vapigen, and I was wondering if I could get them included in vapigen.
> > > > They are quite useful in wrapping not-entirely-glib libraries.
> > >
> > > How is belongs_to different from parent?
> >
> > Okay, so I tried my generation with parent instead of belongs_to. I got
> > a bunch of errors along the lines of:
> >
> > error: `cp.Body' is not a type
> >
> > Even though the classes are defined in my chipmunk-custom.vala file.
> > Correct me if I am wrong, but I think the way parent works is by adding
> > functions to a type that was parsed by vala-gen-introspect. Belongs_to
> > will add the function to types that are defined near the end of
> > generating the vapi file.
>
> No, the symbols are added to a list which for which processing is
> deferred until all other symbols have been processed. See [1]. The patch
> which added initial support for parent is at [2]. There are examples of
> its use in gtk+-2.0, gtk+-3.0, and libsoup-2.4.
>
> It's hard to know exactly what is going on without an example--can you
> post the gidl and metadata somewhere?
Sure thing, both are available at:
http://gitorious.org/chipmunk-vapi/chipmunk-vapi/trees/master/chipmunk
Just replace belongs_to with parent in the metadata file.
Thanks,
Sam
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]