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

> On Sat, Jul 20, 2013 at 12:46 AM,  <stef...@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.

Reply via email to