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

Re: Issues with GD



In article <B500D6C1.2A13%robmyers@cwcom.net>, Rob Myers
<robmyers@cwcom.net> wrote:

> > From: brucehoult@pobox.com (Bruce Hoult)
> >
> > You *could* probably do something like ...
> > 
> > c-expr(int: "sizeof(Point)")
> > 
> > ... instead of the "4".  This *might* limit d2c's ability to do smart
> > things.  (hmm -- can it inline things using c-expr?)
> 
> I don't know, but as I'm using this for the Toolbox lib now it would be good
> to know. :-)
> 
> I assume constants could be assigned in the same way:
> 
> define constant $suspendResumeEvent = c-expr( int: "suspendResumeEvent" );

Um.  That would be a bad idea, form an efficiency point of view, as it
would involve loading from a memory variable.  An inline function would at
least allow it to be used as a literal constant.  But if you can figure
out the value and tell d2c directly then it's even better.

-- Bruce



References: