Re: [PATCH] String API re-implementation using SBuf

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Sat, 12 Oct 2013 18:03:44 +1300

On 10/10/2013 10:12 p.m., Amos Jeffries wrote:
> This patch implements Alex's suggestion for step 1 of String removal
> by ...
>
> Replace String class internals with an SBuf.
>
> This method allows all String code to be converted quickly to SBuf
> without so much worry about correct API conversion elsewhere around
> the code since the wrapper provides exemplar cut-n-paste code to work
> from.
>
> Addition of a SBuf constructor and toSBuf() accessor to String allows
> code using String to be converted directly to the SBuf API in smaller
> portions later. These obsolete the SBuf API converters to String and
> help reduce the SBuf API.

Updated patch following Kinkies audit and subsequent run-time testing.
Since that earlier patch we have made the String class a lot more
self-referential and re-added a few bugs which were in String behaviour.

Note to Alex:
   Please audit this, but with a sole view of checking that the original
String:: API semantics and behaviour are unchanged by the internals
re-write.
This patch seeks to *avoid* several things which would normally take up
auditing time:
* fixing any bugs in the String API semantics or behaviour
* fixing any bugs in the code using String
* using correct C++ coding styles or patterns.

These bugs, behaviour and coding usage checks will be done on the
following transition patches converting code variables from String to
SBuf type.

Amos

Received on Sat Oct 12 2013 - 05:04:05 MDT

This archive was generated by hypermail 2.2.0 : Wed Oct 16 2013 - 12:00:12 MDT