On 2/27/06, Peter Lundblad <peter@famlundblad.se> wrote:
> [I seem to have accidentally taken this off-list. That's because I'm
> still learning my new mail client. Sorry.]
>
> Ivan Zhakov writes:
> > > > Index: subversion/include/svn_io.h
> > > > ===================================================================
> > > > --- subversion/include/svn_io.h (revision 18619)
> > > > +++ subversion/include/svn_io.h (working copy)
> > > > @@ -689,6 +689,17 @@
> > > > svn_error_t *svn_stream_copy(svn_stream_t *from, svn_stream_t *to,
> > > > apr_pool_t *pool);
> > > >
> > > > +/** Set @a *same to non-zero if @a stream1 and @a stream2 have the same
> > > > + * contents, else set it to zero. Use @a pool for temporary allocations.
> > >
> > > Use "TRUE" and "FALSE" instead of non-zero and zero.
> > I have copied this docstring from svn_io_files_contents_same_p(). But
> > anyway I change it to
> > "TRUE" and "FALSE".
> >
> > >
> > > > + *
> > > > + * @since New in 1.4.
> > > > + */
> > > > +svn_error_t *
> > > > +svn_stream_contents_same(svn_boolean_t *same,
> > > > + svn_stream_t *stream1,
> > > > + svn_stream_t *stream2,
> > > > + apr_pool_t *pool);
> > > > +
> > >
> > > We only have one user of this function, so why make it public? (See
> > > below as well.)
> > Several reasons:
> > 1) I hate when source code mixed with general helpers, like
> > svn_stream_contents_same.
> > 2) We have stream object, we have utility function such as open,
> > close, copy so why not extend it with compare?
>
> I wouldn't call open and close utility functions:-) I think it is fine
> to have utility functions public if they are used in several
> libraries.
>
Utility function is not right name, sorry. I mean functions to
manipulate streams.
>
>
> > 3) Minimize probability that somebody later create similar helper in
> > his source file.
> >
> OTOH, we already have lots of public API functions; I still think this
> could go public when necessary instead of now, but I can live with it.
>
I keep it with my aproach, if you can live with it. I've commited
patch in r18628.
I leave docstring for svn_subst_stream_detranslated unchanged. Feel
free to correct language style if you think so.
--
Ivan Zhakov
Received on Mon Feb 27 15:20:44 2006