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

Re: svn commit: r1146452 - /subversion/branches/1.7.x/STATUS

From: Julian Foad <julian.foad_at_wandisco.com>
Date: Thu, 14 Jul 2011 11:45:46 +0100

Daniel Shahaf wrote:
> Oh. And I realized that svn_checksum_to_cstring() only started to
> accept NULL in 1.7. Which means that, currently, in 1.7.x,
> * svn_checksum_to_cstring(NULL) returns NULL
> * svn_checksum_to_cstring_display(NULL) segfaults

The essential and original difference between the two functions is that
given an all-zero input, the former returns NULL whereas the latter
returns a printable representation ("0000000000000000000000...").

So it seems to me that if the _display function is going to do anything
with a null input, it should return some printable representation such
as "(null)", and never return a null pointer.

Alternatively I think it's fine to leave it the way it was, requiring a
non-null input, even though the other function accepts a null input.

- Julian

> Generally I prefer consistency before I prefer that My Way gets
> chosen... which means that I would prefer that these two API's behave
> the same way in 1.7. (In 1.6 both of them segfault.)
> Daniel
> (I don't have /too/ much energy left for this discussion...)
Received on 2011-07-14 12:46:46 CEST

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