Tom Hughes wrote:

> In message <lists.perl6.internals/[EMAIL PROTECTED]>
>         Leopold Toetsch <[EMAIL PROTECTED]> wrote:
> 
> 
>>#17549, 17569 intlist bugfix, speedup, test

> Applied.


Thanks again for all the checkins.


> One slight query I had was the meaning of the extra parameter added
> to intlist_new() by this patch. I assume the idea is that you can call
> it with a value of 0 to reset the intlist?


No it's not a reset thing. I should have documented it better, though i 
thought the wod "initial" would tell it ;-)

The intlist structure is a little bit special, the first chunk - and 
after shift/unshift maybe another entry - is the head of the list, which 
carries additional information: Before my patch only the length of the 
list, and now additionally e.g. the junk_list member.

This head chunk or "the list" is the parameter for the intlist 
functions, in case of shift/unshift you pass an address, because the 
head might move.

The "intial" parameter now constructs such an head entry, is it 0, then 
a "normal" entry is allocated.


> Tom


leo

Reply via email to