Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: refactor memstream for "print -v"



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: Reverse Date, Date, Thread, Author