apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jwool...@apache.org
Subject cvs commit: apr-util/include apr_buckets.h
Date Thu, 28 Feb 2002 23:23:30 GMT
jwoolley    02/02/28 15:23:29

  Modified:    include  apr_ring.h
               include  apr_buckets.h
  Log:
  Add APR_RING_PREPEND() and APR_BRIGADE_PREPEND() as companions to _CONCAT()
  
  Revision  Changes    Path
  1.2       +15 -0     apr/include/apr_ring.h
  
  Index: apr_ring.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_ring.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -d -u -r1.1 -r1.2
  --- apr_ring.h	23 Dec 2001 13:01:06 -0000	1.1
  +++ apr_ring.h	28 Feb 2002 23:23:29 -0000	1.2
  @@ -326,6 +326,21 @@
   	}								\
       } while (0)
   
  +/**
  + * Prepend ring h2 onto the beginning of ring h1, leaving h2 empty.
  + * @param h1   Head of the ring to prepend onto
  + * @param h2   Head of the ring to prepend
  + * @param elem The name of the element struct
  + * @param link The name of the APR_RING_ENTRY in the element struct
  + */
  +#define APR_RING_PREPEND(h1, h2, elem, link) do {			\
  +	if (!APR_RING_EMPTY((h2), elem, link)) {			\
  +	    APR_RING_SPLICE_AFTER(APR_RING_SENTINEL((h1), elem, link),	\
  +				  APR_RING_FIRST((h2)),			\
  +				  APR_RING_LAST((h2)), link);		\
  +	    APR_RING_INIT((h2), elem, link);				\
  +	}								\
  +    } while (0)
   
   /**
    * Unsplice a sequence of elements from a ring
  
  
  
  1.129     +8 -0      apr-util/include/apr_buckets.h
  
  Index: apr_buckets.h
  ===================================================================
  RCS file: /home/cvs/apr-util/include/apr_buckets.h,v
  retrieving revision 1.128
  retrieving revision 1.129
  diff -u -d -u -r1.128 -r1.129
  --- apr_buckets.h	17 Feb 2002 19:22:09 -0000	1.128
  +++ apr_buckets.h	28 Feb 2002 23:23:29 -0000	1.129
  @@ -390,6 +390,14 @@
   	APR_RING_CONCAT(&(a)->list, &(b)->list, apr_bucket, link)
   
   /**
  + * Prepend brigade b onto the beginning of brigade a, leaving brigade b empty
  + * @param a The first brigade
  + * @param b The second brigade
  + */
  +#define APR_BRIGADE_PREPEND(a, b)					\
  +	APR_RING_PREPEND(&(a)->list, &(b)->list, apr_bucket, link)
  +
  +/**
    * Insert a list of buckets before a specified bucket
    * @param a The bucket to insert before
    * @param b The buckets to insert
  
  
  

Mime
View raw message