At 3:49 PM +0100 11/11/04, Leopold Toetsch wrote:
Dan Sugalski <[EMAIL PROTECTED]> wrote:

 ... You really want the
 'b' type if it's a long-lived thing. That pulls the buffer pointer
 out of the string structure and passes it in, so it's suitable for
 mutable stuff. (That's what it's there for, actually)

Using bufstart in string code is almost always wrong, e. g. a COWed substring has strstart pointing to the string while bufstart is the start of the whole buffer. But that's only a small implementation flaw.

Fair 'nuff. It ought to be strstart.

Anyway, yes 'b' seems the right thing here. If the library code messes
with the string this might not be enough, though.

I think it should be OK. There are a few cases where it's still not quite right, but with proper documentation we ought to be fine.
--
Dan


--------------------------------------it's like this-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to