convert string cleanup
jra at samba.org
Tue Mar 29 17:53:29 MDT 2011
On Wed, Mar 30, 2011 at 10:40:08AM +1100, Andrew Bartlett wrote:
> What are your plans for cleaning up the convert_string API that you
> mentioned in your recent commit?
> I'm just keen to ensure we don't step on each other's toes.
> For my part, I'm planning to add the requested tests for the two
> convert_string implementations, using the handles in the samba4 side to
> loop over multiple combinations of unix and dos charset, and deliberatly
> using combinations of greek and ascii text to confirm both the fast and
> slow paths.
I'm converting the convert_string API's to return a bool, rather
than a size_t and return the converted_size as a size_t pointer
parameter. I'm fixing both versions simultaneously - but not
making any other changes (other than the ones needed to fix
I'm trying to get these API's to the state where we never
use the sort of idiom:
pointer += convert_string(XXX)
where we never correctly check that convert_string can have
failed. It's not a massive change, so we shouldn't be getting
in each other's way.
More information about the samba-technical