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

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Wed, 20 Nov 2013 01:19:41 +1300

[ And here is the new patch. ]

This patch implements Alex's suggestion for step 1 of String removal by ...

* Replace String class internal buffer with an SBuf.
* Move converters to/from String and SBuf from SBuf API to String API.

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.

Notes for auditing:
  Please audit this 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 Tue Nov 19 2013 - 12:19:51 MST

This archive was generated by hypermail 2.2.0 : Wed Nov 20 2013 - 12:00:11 MST