subversion-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julian Foad <julianf...@gmail.com>
Subject Re: svn commit: r1707196 - /subversion/trunk/subversion/libsvn_subr/stream.c
Date Wed, 07 Oct 2015 13:50:43 GMT
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

Mime
View raw message