On Wed, Apr 17, 2002, Alex Rousskov wrote:
> Original design note:
>
> memBufAppend should not be used on strings [that
> need implicit \0 termination]. Use memBufPrintf for that.
> memBufAppend is for appending raw opaque data.
>
> I am not objecting to any changes, of course. Just noting the original
> intention to have less overhead for raw operations. If appending
> single strings is a common operation and typing memBufPrintf("%s",
> str) is too much, then replacing memBufAppend with a pair of
> memBufAppendBytes and memBufAppendString (or equivalent) may be the
> right solution to the problem.
>
> Adding a termination character after appending S raw bytes to a buffer
> of size S is expensive and totally unnecessary.
Right. I agree with that.
Ok, how many places use memBufAppend() where they should be using
memBufPrintf() ? :)
Adrian
Received on Wed Apr 17 2002 - 09:20:55 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:15:11 MST