[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] remove svn__strtol() and svn__strtoul()

From: Stefan Sperling <stsp_at_elego.de>
Date: Thu, 7 Aug 2014 08:52:50 +0200

On Thu, Aug 07, 2014 at 01:34:40AM +0200, Branko Čibej wrote:
> On 06.08.2014 23:23, Stefan Sperling wrote:
> > How about I commit my patch, and then someone else (you? Bert?) tunes
> > the implementations of svn_cstring_atoi*, perhaps reusing code from
> > svn__strto* but keeping the API promises intact?
> You'd be silently changing the semantics of public APIs. These are not
> currently documented to be equivalent to strtol & co., but they're
> implemented in terms of apr_strtol & co., which are just replacements
> for those platforms that do not have the standard <string.h> header.


This is about local-dependent behaviour of strtol(), which is defined
to use isspace(). The complaint is that isspace() is slow on Windows so we
shouldn't be using it to parse revision files.

As you say the interface we're using internally is apr_strtoi64() and
that mentions whitespace. I don't think users of our APIs should rely on this.
As you also point out the documentation of svn_cstring_atoi* doesn't say
anything about whitespace or its relatedness to functions that recognize
whitespace! So why does this matter?

I'd prefer to keep using the current implementation and just let Windows be
slow as it is, but the Windows camp is objecting so I'm trying to find some
middle ground...
Received on 2014-08-07 08:57:44 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.