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

Re: svn commit: r15815 - trunk/subversion/include

From: <kfogel_at_collab.net>
Date: 2005-08-23 20:21:13 CEST

rooneg@tigris.org writes:
> Log:
> Prefer the use of APR's macros for manipulating arrays to our own.
>
> Formerly we were undefing these macros if they existed, but it's really
> better to just use the APR versions if they are there.
>
> * subversion/include/svn_types.h
> (APR_ARRAY_IDX, APR_ARRAY_PUSH): only define these macros if APR hasn't
> done it first.

Hah, never mind my mail just now that asked:

> Why are we preferring our own versions to the ones that now ship with APR?
>
> Thanks,
> -K

...in response to r15799. :-)

-Karl

> Modified: trunk/subversion/include/svn_types.h
> Url: http://svn.collab.net/viewcvs/svn/trunk/subversion/include/svn_types.h?rev=15815&p1=trunk/subversion/include/svn_types.h&p2=trunk/subversion/include/svn_types.h&r1=15814&r2=15815
> ==============================================================================
> --- trunk/subversion/include/svn_types.h (original)
> +++ trunk/subversion/include/svn_types.h Thu Aug 18 21:09:53 2005
> @@ -66,21 +66,15 @@
>
>
>
> -/* this is now defined in APR, so undef it to avoid warnings here */
> -#ifdef APR_ARRAY_IDX
> -#undef APR_ARRAY_IDX
> -#endif
> -
> -/* ditto. */
> -#ifdef APR_ARRAY_PUSH
> -#undef APR_ARRAY_PUSH
> -#endif
> -
> /** index into an apr_array_header_t */
> +#ifndef APR_ARRAY_IDX
> #define APR_ARRAY_IDX(ary,i,type) (((type *)(ary)->elts)[i])
> +#endif
>
> /** easier array-pushing syntax */
> +#ifndef APR_ARRAY_PUSH
> #define APR_ARRAY_PUSH(ary,type) (*((type *)apr_array_push (ary)))
> +#endif
>
>
> /** The various types of nodes in the Subversion filesystem. */
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: svn-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: svn-help@subversion.tigris.org
>

-- 
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Aug 23 21:21:04 2005

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.