apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jwool...@apache.org
Subject cvs commit: apr/include apr_ring.h
Date Wed, 13 Aug 2003 01:51:29 GMT
jwoolley    2003/08/12 18:51:29

  Modified:    include  apr_ring.h
  Log:
  ha, then i go to try to use the thing and find out what APR_RING_CHECK_ELEM()
      was for in the first place.
  
  Revision  Changes    Path
  1.12      +17 -2     apr/include/apr_ring.h
  
  Index: apr_ring.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_ring.h,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -d -u -r1.11 -r1.12
  --- apr_ring.h	13 Aug 2003 01:46:12 -0000	1.11
  +++ apr_ring.h	13 Aug 2003 01:51:29 -0000	1.12
  @@ -517,8 +517,12 @@
   	fprintf(stderr, "*** ring check end\n");			\
       } while (0)
   
  -#define APR_RING_CHECK_CONSISTENCY(hp, elem, link) do {			\
  -	struct elem *start = APR_RING_SENTINEL(hp, elem, link);		\
  +#define APR_RING_CHECK_CONSISTENCY(hp, elem, link)			\
  +	APR_RING_CHECK_ELEM_CONSISTENCY(APR_RING_SENTINEL(hp, elem, link),\
  +					elem, link)
  +
  +#define APR_RING_CHECK_ELEM_CONSISTENCY(ep, elem, link) do {		\
  +	struct elem *start = (ep);					\
   	struct elem *here = start;					\
   	do {								\
   	    assert(APR_RING_PREV(APR_RING_NEXT(here, link), link) == here); \
  @@ -567,6 +571,17 @@
    * @param msg  Descriptive message
    */
   #define APR_RING_CHECK_ELEM(ep, elem, link, msg)
  +/**
  + * Loops around a ring, starting with the given element, and checks all
  + * the pointers for consistency.  Pops an assertion if any inconsistency
  + * is found.  Same idea as APR_RING_CHECK_ELEM() except that it's silent
  + * if all is well.
  + *   (This is a no-op unless APR_RING_DEBUG is defined.)
  + * @param ep   The element
  + * @param elem The name of the element struct
  + * @param link The name of the APR_RING_ENTRY in the element struct
  + */
  +#define APR_RING_CHECK_ELEM_CONSISTENCY(ep, elem, link)
   #endif
   
   /** @} */ 
  
  
  

Mime
View raw message