Hi Kinkie,

    I looked at your StringNg wiki page and noticed that your string has
a "char *buf" pointer into the memory buffer (in addition to the buffer
pointer itself). I think it would be better to use an offset instead of
the pointer into internal buffer area:

- cleaner design: no peeking into other object's privates
- easier to change memory buffer internals
- easier to support several buffer types with different internals
- easier to support re-allocation of buffer memory
- easier to provide a thread-safe implementation.

HTH,

Alex.
http://wiki.squid-cache.org/Features/BetterStringBuffer/StringNg


Reply via email to