httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@locus.apache.org
Subject cvs commit: apache-2.0/src/include ap_buckets.h
Date Sat, 19 Aug 2000 16:54:46 GMT
fanf        00/08/19 09:54:46

  Modified:    src      CHANGES
               src/ap   ap_buckets.c ap_buckets_heap.c ap_buckets_mmap.c
                        ap_buckets_refcount.c ap_buckets_simple.c
               src/include ap_buckets.h
  Log:
  Change the way buckets' destroy functions are called so that
  they can be more directly used when changing the type of a
  bucket in place.
  
  Revision  Changes    Path
  1.208     +4 -0      apache-2.0/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/CHANGES,v
  retrieving revision 1.207
  retrieving revision 1.208
  diff -u -u -r1.207 -r1.208
  --- CHANGES	2000/08/19 06:04:51	1.207
  +++ CHANGES	2000/08/19 16:54:44	1.208
  @@ -1,5 +1,9 @@
   Changes with Apache 2.0a7
   
  +  *) Change the way buckets' destroy functions are called so that
  +     they can be more directly used when changing the type of a
  +     bucket in place. [Tony Finch]
  +
     *) Add generic support for reference-counting the resources used by
        buckets, and alter the HEAP and MMAP buckets to use it. Change
        the way buckets are initialised to support changing the type of
  
  
  
  1.10      +1 -1      apache-2.0/src/ap/ap_buckets.c
  
  Index: ap_buckets.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/ap/ap_buckets.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -u -r1.9 -r1.10
  --- ap_buckets.c	2000/08/19 06:04:51	1.9
  +++ ap_buckets.c	2000/08/19 16:54:45	1.10
  @@ -65,7 +65,7 @@
   API_EXPORT(apr_status_t) ap_bucket_destroy(ap_bucket *e)
   {
       if (e->destroy) {
  -        e->destroy(e);
  +        e->destroy(e->data);
       }
       free(e);
       return APR_SUCCESS;
  
  
  
  1.9       +2 -2      apache-2.0/src/ap/ap_buckets_heap.c
  
  Index: ap_buckets_heap.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/ap/ap_buckets_heap.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -u -r1.8 -r1.9
  --- ap_buckets_heap.c	2000/08/19 06:04:52	1.8
  +++ ap_buckets_heap.c	2000/08/19 16:54:45	1.9
  @@ -76,11 +76,11 @@
       return APR_SUCCESS;
   }
   
  -static void heap_destroy(ap_bucket *b)
  +static void heap_destroy(void *data)
   {
       ap_bucket_heap *h;
   
  -    h = ap_bucket_destroy_shared(b);
  +    h = ap_bucket_destroy_shared(data);
       if (h == NULL) {
   	return;
       }
  
  
  
  1.7       +2 -2      apache-2.0/src/ap/ap_buckets_mmap.c
  
  Index: ap_buckets_mmap.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/ap/ap_buckets_mmap.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -u -r1.6 -r1.7
  --- ap_buckets_mmap.c	2000/08/19 06:04:52	1.6
  +++ ap_buckets_mmap.c	2000/08/19 16:54:45	1.7
  @@ -73,11 +73,11 @@
       return APR_SUCCESS;
   }
   
  -static void mmap_destroy(ap_bucket *b)
  +static void mmap_destroy(void *data)
   {
       ap_bucket_mmap *m;
   
  -    m = ap_bucket_destroy_shared(b);
  +    m = ap_bucket_destroy_shared(data);
       if (m == NULL) {
   	return;
       }
  
  
  
  1.2       +2 -2      apache-2.0/src/ap/ap_buckets_refcount.c
  
  Index: ap_buckets_refcount.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/ap/ap_buckets_refcount.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -u -r1.1 -r1.2
  --- ap_buckets_refcount.c	2000/08/19 06:04:52	1.1
  +++ ap_buckets_refcount.c	2000/08/19 16:54:45	1.2
  @@ -100,9 +100,9 @@
       return APR_SUCCESS;
   }
   
  -API_EXPORT(void *) ap_bucket_destroy_shared(ap_bucket *b)
  +API_EXPORT(void *) ap_bucket_destroy_shared(void *data)
   {
  -    ap_bucket_shared *s = b->data;
  +    ap_bucket_shared *s = data;
       ap_bucket_refcount *r = s->data;
   
       free(s);
  
  
  
  1.2       +1 -6      apache-2.0/src/ap/ap_buckets_simple.c
  
  Index: ap_buckets_simple.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/ap/ap_buckets_simple.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -u -r1.1 -r1.2
  --- ap_buckets_simple.c	2000/08/19 06:05:50	1.1
  +++ ap_buckets_simple.c	2000/08/19 16:54:45	1.2
  @@ -108,11 +108,6 @@
       return APR_SUCCESS;
   }
   
  -static void simple_destroy(ap_bucket *b)
  -{
  -    free(b->data);
  -}
  -
   API_EXPORT(ap_bucket *) ap_bucket_make_immortal(ap_bucket *b,
   		const char *buf, apr_size_t length)
   {
  @@ -129,7 +124,7 @@
       b->type     = AP_BUCKET_IMMORTAL;
       b->length   = length;
       b->setaside = NULL;
  -    b->destroy  = simple_destroy;
  +    b->destroy  = free;
       b->split    = simple_split;
       b->read     = simple_read;
       b->data     = bd;
  
  
  
  1.13      +4 -3      apache-2.0/src/include/ap_buckets.h
  
  Index: ap_buckets.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/include/ap_buckets.h,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -u -r1.12 -r1.13
  --- ap_buckets.h	2000/08/19 06:04:54	1.12
  +++ ap_buckets.h	2000/08/19 16:54:46	1.13
  @@ -158,8 +158,9 @@
       /**
        * Free the private data and any resources used by the bucket
        * (if they aren't shared with another bucket).
  +     * @param data The private data pointer from the bucket to be destroyed
        */
  -    void (*destroy)(ap_bucket *e);                /* can be NULL */
  +    void (*destroy)(void *data);
   
       /** Read the data from the bucket.
        * @param b The bucket to read from
  @@ -427,12 +428,12 @@
    * Decrement the refcount of the data in the bucket and free the
    * ap_bucket_shared structure. This function should only be called by
    * type-specific bucket destruction functions.
  - * @param b The bucket to be destroyed
  + * @param data The private data pointer from the bucket to be destroyed
    * @return NULL if nothing needs to be done,
    *         otherwise a pointer to the private data structure which
    *         must be destroyed because its reference count is zero
    * @deffunc API_EXPORT(void *) ap_bucket_shared_destroy(ap_bucket *b) */
  -API_EXPORT(void *) ap_bucket_destroy_shared(ap_bucket *b);
  +API_EXPORT(void *) ap_bucket_destroy_shared(void *data);
   
   /**
    * Split a bucket into two at the given point, and adjust the refcount
  
  
  

Mime
View raw message