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

Re: svn commit: r1707196 - /subversion/trunk/subversion/libsvn_subr/stream.c

From: Julian Foad <julianfoad_at_gmail.com>
Date: Wed, 7 Oct 2015 14:50:43 +0100

Ivan Zhakov wrote:
> Thanks for pointing to svn_string_from_stream(), but this function
> slightly different: it has SCRATCH_POOL argument and doesn't have
> LEN_HINT argument. It's little difference in semantic.

Yes, it is slightly different. That doesn't justify it having a
completely different implementation, does it? The length hint in
_stringbuf... is optional, so it also has to operate without a length
hint like _string_ does. The lack of a separate scratch pool is not a
meaningful semantic difference.

I would also add: why should they have slightly different API forms?
They should not. Stupid differences like this just make things harder
for no good reason. Let's make them identical, deprecating and bumping
one or both of them to do so.

It seems obvious to me that these functions are basically intended to
do the same job, just with different output data type. Do you
disagree? And if that is so, then they should have a common
implementation. Do you disagree?

- Julian
Received on 2015-10-07 15:51:05 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.