Zsh Mailing List Archive
Messages sorted by:
Re: PATCH: refactor memstream for "print -v"
- X-seq: zsh-workers 37510
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: PATCH: refactor memstream for "print -v"
- Date: Tue, 5 Jan 2016 09:58:34 -0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version:content-type; bh=q5rF6MI5f8qX9BialNgTfKDUCxIV6toGQ/yDn0t+ZrQ=; b=1fUeCihmvdLezFTUgo4GVOB9iLfDW5qM5jYoCl2t7b9pCG58oKOHvs1uwFyU1nRQcI 9ZZxD8PtKy6WCTqX4jiCF/6I/R32w4+5BWKmhI5LNY+DKqHb1bVtxo5tMja4OWf4gxPU MC88ryQayitymyrNKw7/J6nhJ4RDKhl93g/H/RzTvi7FDq7eBgwo8k6JxoNcARrgjYAo oxD43mgnXJmE488rZ/c3jYnRJ6fwFOnM+UlxEt9IUyi9Zkukw+16980FHdadOCS8Kb3t xXo69Sr0l9K5ej4uQizbxzZWEW+jaXuoH99UZ0cxugEWhm8Qd30bDzQoXHcarezIn3PF OYJQ==
- In-reply-to: <4052A17B-0432-44A7-8A84-F615FD836FCF@kba.biglobe.ne.jp>
- List-help: <mailto:firstname.lastname@example.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:email@example.com>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <160104231830.ZM20279@torch.brasslantern.com> <4052A17B-0432-44A7-8A84-F615FD836FCF@kba.biglobe.ne.jp>
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.
Messages sorted by: