Re: [PATCH][MERGE-TRACKING] New function to create a mergeinfo hash out of a single path and single merge-range
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().
Received on Tue Oct 10 12:26:01 2006
- application/pgp-signature attachment: stored
This is an archived mail posted to the Subversion Dev