httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stodd...@locus.apache.org
Subject cvs commit: apache-2.0/src/ap ap_buckets.c
Date Mon, 14 Aug 2000 20:44:34 GMT
stoddard    00/08/14 13:44:34

  Modified:    src/include ap_buckets.h
               src/ap   ap_buckets.c
  Log:
  Win32: Fix compile problem caused by registering an API_EXPORTed function as
  a cleanup. In general, we should only register static functions as clean-up
  to avoid this problem in the future.
  
  Revision  Changes    Path
  1.4       +1 -1      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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ap_buckets.h	2000/08/13 01:01:13	1.3
  +++ ap_buckets.h	2000/08/14 20:44:33	1.4
  @@ -300,7 +300,7 @@
    * @param b The bucket brigade to destroy
    * @deffunc apr_status_t ap_brigade_destroy(void *b)
    */
  -API_EXPORT(apr_status_t) ap_brigade_destroy(void *b);
  +API_EXPORT(apr_status_t) ap_brigade_destroy(ap_bucket_brigade *b);
   
   /**
    * append bucket(s) to a bucket_brigade.  This is the correct way to add
  
  
  
  1.7       +7 -6      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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ap_buckets.c	2000/08/14 20:02:17	1.6
  +++ ap_buckets.c	2000/08/14 20:44:33	1.7
  @@ -84,8 +84,7 @@
       }
       return APR_SUCCESS;
   }
  -
  -API_EXPORT(apr_status_t) ap_brigade_destroy(void *data)
  +static apr_status_t ap_brigade_cleanup(void *data)
   {
       ap_bucket_brigade *b = data;
   
  @@ -93,10 +92,13 @@
       /* 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.
        */
  -
  -    apr_kill_cleanup(b->p, b, ap_brigade_destroy);
       return APR_SUCCESS;
   }
  +API_EXPORT(apr_status_t) ap_brigade_destroy(ap_bucket_brigade *b)
  +{
  +    apr_kill_cleanup(b->p, b, ap_brigade_cleanup);
  +    return ap_brigade_cleanup(b);
  +}
   
   API_EXPORT(ap_bucket_brigade *) ap_brigade_create(apr_pool_t *p)
   {
  @@ -106,8 +108,7 @@
       b->p = p;
       b->head = b->tail = NULL;
   
  -    apr_register_cleanup(b->p, b, ap_brigade_destroy, 
  -                        ap_brigade_destroy);
  +    apr_register_cleanup(b->p, b, ap_brigade_cleanup, ap_brigade_cleanup);
       return b;
   }
   
  
  
  

Mime
View raw message