Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Id: Zsh Workers List <zsh-workers.zsh.org>
List-Post: <mailto:zsh-workers@zsh.org>
List-Help: <mailto:zsh-workers-help@zsh.org>
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID
	autolearn=ham autolearn_force=no version=3.4.0
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==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:from:message-id:date:in-reply-to:comments
         :references:to:subject:mime-version:content-type;
        bh=q5rF6MI5f8qX9BialNgTfKDUCxIV6toGQ/yDn0t+ZrQ=;
        b=h/yHobvQESVuxjlTCT5IJrufuA8fXJSba6prLHanrCfM4hptFKyLj9x+RN4s9d0b5u
         jl4uVHlKXJmPKDZ1ofRDqpO5sqr6N532TXm/4bC7zl3w6Qr6AxuK3bYtk0MB8IjtIW7Q
         RlzlXURHCYRZUm1aCSU9Yh63Hvb/92p3zhMsNfNdxLp/7Vm6MyuYW7nl4l9sgno5fncT
         i8fnqxrwi9hFQtuWyVcCSCryPr8qyzhnOysBzZs5w6ryrAoGeQYGz7S7oaurZ+0sbzhp
         vmJxeD82ehqb+YsdTcaF3kHWWeFnqLaQOkmxORckmA4c7zI37bFOfJdQjUA7wXpr5upe
         myfA==
X-Gm-Message-State: ALoCoQkWLObBL6v3FgYqwporffpftaSXsZ5FKTnVvj/GD9SPjc2n78gLCaoDKNd7VevtG94qMe/BVLkm8vdhBpHY25wOKXIO3g==
X-Received: by 10.98.68.201 with SMTP id m70mr90675371pfi.49.1452016712594;
        Tue, 05 Jan 2016 09:58:32 -0800 (PST)
From: Bart Schaefer <schaefer@brasslantern.com>
Message-Id: <160105095834.ZM3834@torch.brasslantern.com>
Date: Tue, 5 Jan 2016 09:58:34 -0800
In-Reply-To: <4052A17B-0432-44A7-8A84-F615FD836FCF@kba.biglobe.ne.jp>
Comments: In reply to "Jun T." <takimoto-j@kba.biglobe.ne.jp>
        "Re: PATCH: refactor memstream for "print -v"" (Jan  6,  1:31am)
References: <160104231830.ZM20279@torch.brasslantern.com> 
	<4052A17B-0432-44A7-8A84-F615FD836FCF@kba.biglobe.ne.jp>
X-Mailer: OpenZMail Classic (0.9.2 24April2005)
To: zsh-workers@zsh.org
Subject: Re: PATCH: refactor memstream for "print -v"
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Seq: zsh-workers 37510

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.

