Subject: Re: PATCH: refactor memstream for "print -v"
From: Bart Schaefer <[email-masked]>
To: [email-masked]
Date: Tue, 5 Jan 2016 09:58:34 -0800
List-Id: Zsh Workers List <zsh-workers.zsh.org>

On Jan 6,  1:31am, Jun T. wrote:
} Subject: Re: PATCH: refactor memstream for "print -v"
}
} The last part (READ_MSTREAM) is for not adding a trailing NULL
} to buf.

Why not?  I know it's not strictly necessary given metafy(), but I was
trying to be consistent with open_memstream() which maintains a NUL at
the end of the buffer it manages.

} The cast (int)count is just to silence the following
} warning from clang:

Thanks; I was wondering if that was going to happen, though I presumed
that (x : y : -1) would automatically be converted to integer because
of -1 even if y were unsigned.  

Maybe it should be (long) though?  And I suppose the comparison should
explicitly be == -1 rather than < 0 in case mcount is ridiculusly big.