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

Re: [PATCH] automatic properties

From: Martin Furter <mf_at_rola.ch>
Date: 2003-10-02 18:47:28 CEST

On Thu, 2 Oct 2003, Philip Martin wrote:

> Martin Furter <mf@rola.ch> writes:
>
> > Index: subversion/libsvn_client/commit.c
> > ===================================================================
> > --- subversion/libsvn_client/commit.c (revision 7267)
> > +++ subversion/libsvn_client/commit.c (working copy)
>
> > - SVN_ERR (editor->change_file_prop (file_baton, SVN_PROP_EXECUTABLE,
> > - svn_string_create ("", pool),
> > - pool));
> > -
> > + apr_hash_this (hi, (const void **)&propname, NULL,
> > + (void **)&propvalue.data);
>
> Don't use casts like this, look at other places that use apr_hash_this
> and follow the same method.
>
> > + propvalue.len = strlen (propvalue.data);
> > + SVN_ERR (editor->change_file_prop (file_baton, propname,
> > + &propvalue, pool));
> > + }
> > + }
> > +

        {
          const void *propname;
          void *propvalue;
          svn_string_t propvaluestr;

          apr_hash_this (hi, &propname, NULL, &propvalue);
          propvaluestr.data = propvalue;
          propvaluestr.len = strlen (propvaluestr.data);
          SVN_ERR (editor->change_file_prop (file_baton, propname,
                                             &propvaluestr, pool));
        }

Does that look better ?

Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Oct 2 18:49:51 2003

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.