On Mon, Sep 17, 2001 at 02:33:53PM -0500, Gibbs Tanton - tgibbs wrote:
> Okey Dokey.  With that being the case, it appears we should rethink
> string_grow/string_make.  If we get a length of 0, we should allocate 1 byte
> and store '\0' in it

Nope. If we get a length of 0, we don't do anything. String accesses have
to go through the abstraction, so they can deal with accessing zero length
buffers. The only time that a non-abstracted function has to deal with
the buffer and the length separately is when we do printf-like things; this
is why we need to roll our own printf, which takes a STRING* argument for
%s.

Simon

-- 
<Addi> Just imagine we are meeting the aliens for the first time.
<ton> Most people would just shoot them to see how many points they are
worth.

Reply via email to