g-wrap-dev
[Top][All Lists]
Advanced

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

Re: [Fwd: Re: First look at new g-wrap -- it's slow!]


From: Andy Wingo
Subject: Re: [Fwd: Re: First look at new g-wrap -- it's slow!]
Date: Sun, 30 May 2004 13:30:20 +0100

Yo,

On Thu, 2004-05-27 at 19:15 +0200, Andreas Rottmann wrote:
> Andy Wingo <address@hidden> writes:
> 
> > When this procedure is called, it will store information about the
> > return type (henceforth `R') as (make mchars #:options '(caller-owned)).
[...]
> > The type is
> > implicit in the R's hierarchy; specifically, R is an instance of mchars.
> >
> I think I found a little quirk in the approach: I currently have
> methods on types likes this:
> 
> (define-method (global-declarations-cg (wrapset <gw-wrapset>)
>                                        (mchars <gw-ctype-mchars>))
>   (list (next-method)
>         "#include <string.h>\n"))

It seems you got bit by the goops-lacks-class-methods problem, and that
sucks because having the specializer as

        (mchars (<gw-ctype-mchars> :class))

or something would be a lot cleaner. If this is the only instance of the
problem, you could say that <gw-type> has a slot for global
initializations, such that you could collect the global declarations by
slot-reffing the type class and all superclasses.

My perspective is that putting the type class in the hierarchy is
cleaner, even if you have to hack on the margins. But that's just me ;-)

Cheers,
-- 
Andy Wingo <address@hidden>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]