|
From: | dak |
Subject: | Re: Part_combine_iterator::derived_mark: don't abort marking prematurely. (issue 6057044) |
Date: | Wed, 18 Apr 2012 05:51:23 +0000 |
On 2012/04/18 05:49:01, dak wrote:
On 2012/04/18 04:39:20, dak wrote: > One could instead use a static array with pointers-to-member
(basically
> offsets), and then dereference them. In that case, a 0 entry would
indeed work
> as an ending mark. > > But for 4 entries?
To illustrate:
static Stream_event * Part_combine_iterator::* ptrs[] = { &Part_combine_iterator::unisono_event_, &Part_combine_iterator::mmrest_event_, &Part_combine_iterator::solo_two_event_, &Part_combine_iterator::solo_one_event_, 0 }; for (int i = 0; ptrs[i]; i++) if (ptrs[i])
Uh, if (this->*ptrs[i]) of course
scm_gc_mark ((this->*ptrs[i])->self_scm ());
http://codereview.appspot.com/6057044/
[Prev in Thread] | Current Thread | [Next in Thread] |