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

Re: [PATCH] stdlib removed from svn_types.h

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2004-03-10 18:11:17 CET

H. Hernan Moraldo wrote:
> Remove the #include <stdlib.h> line from svn_types.h, and add that line
> to any other files that actually need it.
[...]
> On subversion/include/svn_types.h there were some lines telling:
>
> /* ### this should go away, but it causes too much breakage right now */
> #include <stdlib.h>

Very nearly OK ... but there is one macro that needs stdlib.h:

/** Convert null-terminated C string @a str to a revision number. */
#define SVN_STR_TO_REV(str) ((svn_revnum_t) atol(str))

svn_types.h including stdlib.h is logically correct because it uses it; though only if that macro is used.

From a clean design point of view, that macro should not be as it is in that header; a function should be used instead.

Maybe the "###" comment should go away or be changed to something more accurate, but I don't think this patch is strictly better than the status quo; just better in some ways.

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Mar 10 18:10:31 2004

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.