In message <[EMAIL PROTECTED]>
          Leopold Toetsch <[EMAIL PROTECTED]> wrote:

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

Well I was thinking of it as initial allocation versus reallocation.

> 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.

So it's an implementation detail that doesn't need to be exposed
outside of the intlist code and therefore probably shouldn't be ;-)

Seriously, I'd suggest putting the common code into intlist_new_chunk
or something and then have intlist_new call that before doing the
other setup. That way you don't need the extra argument.

Tom

-- 
Tom Hughes ([EMAIL PROTECTED])
http://www.compton.nu/

Reply via email to