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

Re: [PATCH][MERGE-TRACKING] New function to create a mergeinfo hash out of a single path and single merge-range

From: Kamesh Jayachandran <kamesh_at_collab.net>
Date: 2006-10-10 12:25:32 CEST

Malcolm Rowe wrote:
> On Tue, Oct 10, 2006 at 02:48:47PM +0530, Kamesh Jayachandran wrote:
>
>>> + svn_merge_range_t *range = apr_palloc(pool, sizeof(*range));
>>>
>>>
>> I feel
>>
>> - svn_merge_range_t *range = apr_palloc(pool, sizeof(*range));
>> + svn_merge_range_t *range = apr_palloc(pool, sizeof(svn_merge_range_t));
>>
>> more clearer.
>>
>>
>
> We already use the former pattern pretty-much exclusively. It has the
> advantage that you only need to give the type once, so that the
> allocation can never get out of step with the definition. For example,
> if we were to create an svn_merge_range2_t type, we might change the
> definition of 'range' but forget to change the argument to sizeof().
>
> Regards,
> Malcolm
>
Makes sense, When I looked at it I was wondering from where the 'range'
comes from,(I first looked at args, I could not find one, then happened
to find it at left hand side.)

With regards
Kamesh Jayachandran

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Oct 10 12:29:01 2006

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.