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

Re: svn commit: r1483292 - in /subversion/trunk/subversion: include/private/svn_string_private.h libsvn_subr/string.c libsvn_subr/types.c

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Fri, 17 May 2013 10:11:59 +0100

Branko ─îibej <brane_at_wandisco.com> writes:

> I always felt the strtol signature was massively broken because of
> that.

Probably a legacy of K&R C which didn't have function prototypes or
const. Very few people parse truly const memory so it is usually
legitimate to write to 'end'. In ISO C with both const and non-const
'end' there is going to be a cast in the user code somewhere. I guess
not breaking legacy code won.

In our code we could change the function signature from 'char **end' to
'int *count' and avoid the cast.

-- 
Certified & Supported Apache Subversion Downloads:
http://www.wandisco.com/subversion/download
Received on 2013-05-17 11:12:41 CEST

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