At 10:32 PM 12/31/2001 +0200, Peter Gibbs wrote: >----- Original Message ----- >From: "Dan Sugalski" <[EMAIL PROTECTED]> > > Yup. Destroyed strings just get their buffer pointers set to NULL. GC'll > > collect things up. Also means COW string buffers can share pointers to the > > same buffer. > > > >Dan/David > >With regard to COW strings - would the buffer-related parameters (eg >bufstart, buflen, bufused) then not be linked to the buffer rather than the >string? ie should we have two structs (STRING & BUFFER) rather than one >combined one, with STRING pointing to BUFFER rather than directly to memory?
Nope. COW strings would, when writing, get a new buffer and update the values as need be. You just need to make sure that the string functions are updating the values in the buffer header and not external code. Dan --------------------------------------"it's like this"------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk