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

Re: svn commit: r36747 - trunk/subversion/libsvn_subr

From: Greg Stein <gstein_at_gmail.com>
Date: Tue, 24 Mar 2009 23:17:45 +0100

I think the change is fine. "Knowing" that a close is a no-op implies
knowing the implementation, rather than the abstraction.

If you can demonstrate this close is a problem (e.g. performance),
then we can eliminate it, leaving a comment in place to explain the
situation.

Cheers,
-g

On Tue, Mar 24, 2009 at 22:35, Bert Huijben <rhuijben_at_sharpsvn.net> wrote:
>> -----Original Message-----
>> From: Ivan Zhakov [mailto:chemodax_at_gmail.com]
>> Sent: Monday, March 23, 2009 8:25 PM
>> To: svn_at_subversion.tigris.org
>> Subject: svn commit: r36747 - trunk/subversion/libsvn_subr
>>
>> Author: zhakov
>> Date: Mon Mar 23 12:24:54 2009
>> New Revision: 36747
>>
>> Log:
>> * subversion/libsvn_subr/subst.c:
>>   (svn_subst_translate_cstring2): Close the destination stream to flush
>>    unwritten data.
>>
>> Modified:
>>    trunk/subversion/libsvn_subr/subst.c
>>
>> Modified: trunk/subversion/libsvn_subr/subst.c
>> URL:
>> http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_subr/subst.c?p
>> athrev=36747&r1=36746&r2=36747
>> =======================================================================
>> =======
>> --- trunk/subversion/libsvn_subr/subst.c      Mon Mar 23 04:11:03 2009
>>       (r36746)
>> +++ trunk/subversion/libsvn_subr/subst.c      Mon Mar 23 12:24:54 2009
>>       (r36747)
>> @@ -1241,6 +1241,9 @@ svn_subst_translate_cstring2(const char
>>    /* Jam the text into the destination stream (to translate it). */
>>    SVN_ERR(svn_stream_write(dst_stream, src, &len));
>>
>> +  /* Close the destination stream to flush unwritten data. */
>> +  SVN_ERR(svn_stream_close(dst_stream));
>> +
>>    *dst = dst_stringbuf->data;
>>    return SVN_NO_ERROR;
>>  }
>
>        Hi,
>
> How could this cause unflushed data?
>
> If I look at svn_stream_from_stringbuf() it doesn't define an explicit close
> function, so the svn_stream_close() will be a no-op.
>
> (write_handler_stringbuf in stream.c directly adds all data into the string
> buffer; there is no extra buffer layer)
>
>        Bert
>
>>
>> ------------------------------------------------------
>> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=495&dsMessageI
>> d=1391896
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=495&dsMessageId=1406301
>

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1406546
Received on 2009-03-24 23:18:05 CET

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.