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

Re: svn commit: r1505006 - in /subversion/trunk: ./ subversion/include/svn_io.h subversion/libsvn_client/patch.c subversion/libsvn_fs_fs/fs_fs.c subversion/libsvn_subr/io.c

From: Stefan Fuhrmann <stefan.fuhrmann_at_wandisco.com>
Date: Sun, 21 Jul 2013 01:03:48 +0200

On Sat, Jul 20, 2013 at 12:30 AM, Ivan Zhakov <ivan_at_visualsvn.com> wrote:

> On Sat, Jul 20, 2013 at 12:46 AM, <stefan2_at_apache.org> wrote:
> > Author: stefan2
> > Date: Fri Jul 19 20:46:22 2013
> > New Revision: 1505006
> >
> > URL: http://svn.apache.org/r1505006
> > Log:
> > Merge revisions r1433848,1438408,1445080 from branches/fsfs-format7.
> > These introduce svn_io_file_create_empty and svn_io_file_create_binary
> > as alternatives to svn_io_file_create.
> >
> [...]
>
> >
> > +svn_error_t *svn_io_file_create(const char *file,
> > + const char *contents,
> > + apr_pool_t *pool)
> > +{
> > + return svn_error_trace(svn_io_file_create_binary(file, contents,
> > + strlen(contents),
> pool));
> > +}
> > +
> > +svn_error_t *svn_io_file_create_empty(const char *file,
> > + apr_pool_t *pool)
> > +{
> > + return svn_error_trace(svn_io_file_create_binary(file, "", 0, pool));
> > +}
> You may just pass NULL to svn_io_file_create_binary for zero length
> data.

True but I preferred the contents pointer to always be valid.

> Also I'm not sure that svn_io_file_create_empty() is really
> needed.
>

It is more convenient, more expressive and is being used
as such in a number of places.

-- Stefan^2.
Received on 2013-07-21 01:04:18 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.