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

Re: svn commit: r39635 - in trunk/subversion/bindings/swig: . include python/libsvn_swig_py

From: Stefan Sperling <stsp_at_elego.de>
Date: Thu, 1 Oct 2009 18:17:02 +0100

On Thu, Oct 01, 2009 at 06:11:48PM +0100, Julian Foad wrote:
> Stefan Sperling wrote:
> > > + APR_ARRAY_IDX(temp, targlen, void *) = struct_ptr;
> >
> > You could use APR_ARRAY_PUSH(temp, void *) = struct_ptr; here.
> > That would align better with common use of arrays in our code,
> > PUSH is usually used for writing to the array, IDX for retrieval.
>
> No, PUSH is different: it means extend the array by one element and then
> set that element.

Oh! Right, then I was mistaken. So in this case, PUSH would only be
appropriate if the array was created with 0 elements initially.

So IDX is fine, but using a separate variable for the index would
still be nice :)

Thanks,
Stefan

-- 
printf("Eh???/n");
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2402618
Received on 2009-10-01 19:17:26 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.