[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Creates pure closures (issue 4894052)
From: |
Mike Solomon |
Subject: |
Re: Creates pure closures (issue 4894052) |
Date: |
Thu, 18 Aug 2011 14:44:45 +0200 |
On Aug 18, 2011, at 2:31 PM, address@hidden wrote:
> Hi Mike,
>
> I have reservations about the naming, since you're basically creating a
> smob which acts as a container for a pair of callbacks; it doesn't work
> like a simple-closure in that you can evaluate the closure and get
> something useful back.
>
> Cheers,
> Neil
>
What about pure-container ?
>
> http://codereview.appspot.com/4894052/diff/1/lily/pure-closure.cc
> File lily/pure-closure.cc (right):
>
> http://codereview.appspot.com/4894052/diff/1/lily/pure-closure.cc#newcode65
> lily/pure-closure.cc:65: 2, 0, 0, (SCM pc),
> 1, 0, 0,
>
> (there's only one arg; looks like you've been cut'n'pasting from
> simple-closure.cc :)
>
> http://codereview.appspot.com/4894052/diff/1/lily/pure-closure.cc#newcode73
> lily/pure-closure.cc:73: 2, 0, 0, (SCM pc),
> 1, 0, 0,
>
Fixed and fixed - thanks!
> http://codereview.appspot.com/4894052/diff/1/lily/pure-closure.cc#newcode84
> lily/pure-closure.cc:84: scm_display (scm_cdr (s), port);
> this only displays the unpure part, and if you change it to show both,
> there seems to be a garbage collection problem (probably to do with
> using scm_markcdr in init_pure_closure ()); the pure part has been swept
> away:
>
I posted a new patch that should fix this.
Many thanks, as always!
Cheers,
MS
- Creates pure closures (issue 4894052), mtsolo, 2011/08/18
- Re: Creates pure closures (issue 4894052), n . puttock, 2011/08/19
- Re: Creates pure closures (issue 4894052), pkx166h, 2011/08/27
- Re: Creates pure closures (issue 4894052), n . puttock, 2011/08/31
- Re: Creates pure closures (issue 4894052), n . puttock, 2011/08/31