httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@locus.apache.org
Subject cvs commit: apache-2.0/src/lib/apr/buckets ap_buf.c apr_buf.h
Date Tue, 01 Aug 2000 15:41:55 GMT
rbb         00/08/01 08:41:55

  Modified:    src/lib/apr/buckets ap_buf.c apr_buf.h
  Log:
  Make ap_bucket_list_destroy a static function.  It should never be used
  outside the buckets code.
  
  Revision  Changes    Path
  1.20      +14 -22    apache-2.0/src/lib/apr/buckets/ap_buf.c
  
  Index: ap_buf.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/buckets/ap_buf.c,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- ap_buf.c	2000/07/31 23:23:38	1.19
  +++ ap_buf.c	2000/08/01 15:41:54	1.20
  @@ -72,19 +72,7 @@
       return APR_SUCCESS;
   }
   
  -APR_EXPORT(ap_status_t) ap_brigade_destroy(void *data)
  -{
  -    ap_bucket_brigade *b = data;
  -
  -    ap_bucket_list_destroy(b->head);
  -    /* The brigade itself is allocated out of a pool, so we don't actually 
  -     * want to free it.  If we did, we would do that free() here.
  -     */
  -
  -    return APR_SUCCESS;
  -}
  -
  -APR_EXPORT(ap_status_t) ap_bucket_list_destroy(ap_bucket *e)
  +static ap_status_t ap_bucket_list_destroy(ap_bucket *e)
   {
       ap_bucket *cur = e;
       ap_bucket *next;
  @@ -97,6 +85,18 @@
       return APR_SUCCESS;
   }
   
  +APR_EXPORT(ap_status_t) ap_brigade_destroy(void *data)
  +{
  +    ap_bucket_brigade *b = data;
  +
  +    ap_bucket_list_destroy(b->head);
  +    /* The brigade itself is allocated out of a pool, so we don't actually 
  +     * want to free it.  If we did, we would do that free() here.
  +     */
  +
  +    return APR_SUCCESS;
  +}
  +
   APR_EXPORT(ap_bucket_brigade *) ap_brigade_create(ap_pool_t *p)
   {
       ap_bucket_brigade *b;
  @@ -137,8 +137,8 @@
       orig = vec;
       e = b->head;
       while (e && nvec) {
  -	vec->iov_base = (void *)ap_get_bucket_char_str(e);
   	vec->iov_len = ap_get_bucket_len(e);
  +	vec->iov_base = (void *)e->read(e);
   	e = e->next;
   	--nvec;
   	++vec;
  @@ -202,14 +202,6 @@
       } while (iov_used == 16);
       return APR_SUCCESS;
   }
  -
  -APR_EXPORT(const char *) ap_get_bucket_char_str(ap_bucket *b)
  -{
  -    if (b) {
  -        return b->read(b);
  -    }
  -    return NULL;
  -}    
   
   APR_EXPORT(int) ap_get_bucket_len(ap_bucket *b)
   {
  
  
  
  1.21      +0 -6      apache-2.0/src/lib/apr/buckets/apr_buf.h
  
  Index: apr_buf.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/buckets/apr_buf.h,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- apr_buf.h	2000/08/01 00:26:54	1.20
  +++ apr_buf.h	2000/08/01 15:41:54	1.21
  @@ -358,12 +358,6 @@
    */
   APR_EXPORT(ap_status_t) ap_bucket_destroy(ap_bucket *e);
   
  -/* destroy an entire list of buckets.  I am not sure how useful this is,
  - * because it basically duplicates some logic in the bucket_brigade section.
  - * I need to review where this is used and remove it if at all possible.
  - */
  -APR_EXPORT(ap_status_t) ap_bucket_list_destroy(ap_bucket *e);
  -
   /* get the length of the data in the bucket that is currently being
    * referenced.  The bucket may contain more data, but if the start or end
    * has been moved, we really don't care about it.
  
  
  

Mime
View raw message