httpd-docs 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/include ap_buckets.h
Date Mon, 16 Oct 2000 14:08:24 GMT
rbb         00/10/16 07:08:24

  Modified:    src      CHANGES
               src/ap   ap_buckets.c
               src/include ap_buckets.h
  Log:
  Make ap_bucket_(read|destroy|split|setaside) into macros.  Also
  makes ap_bucket_destroy a return void, which is okay because it
  used to always return APR_SUCCESS, and nobody ever checked its
  return value anyway.
  Submitted by:	Cliff Woolley <cliffwoolley@yahoo.com>
  Reviewed by:	Ryan Bloom
  
  Revision  Changes    Path
  1.275     +10 -0     apache-2.0/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/CHANGES,v
  retrieving revision 1.274
  retrieving revision 1.275
  diff -u -r1.274 -r1.275
  --- CHANGES	2000/10/16 06:04:27	1.274
  +++ CHANGES	2000/10/16 14:08:21	1.275
  @@ -1,4 +1,14 @@
   Changes with Apache 2.0a8
  +  *) Make ap_bucket_(read|destroy|split|setaside) into macros.  Also
  +     makes ap_bucket_destroy a return void, which is okay because it
  +     used to always return APR_SUCCESS, and nobody ever checked its
  +     return value anyway.
  +     [Cliff Woolley <cliffwoolley@yahoo.com>]
  +
  +  *) Remove the index into the bucket-type table from the buckets
  +     structure.  This has now been replaced with a pointer to the
  +     bucket_type.  Also add some macros to test the bucket-type.
  +     [Ryan Bloom]
   
     *) Renamed all MODULE_EXPORT symbols to AP_MODULE_DECLARE and all symbols
        for CORE_EXPORT to AP_CORE_DECLARE (namespace protecting the wrapper)
  
  
  
  1.27      +0 -23     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.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- ap_buckets.c	2000/10/16 06:29:37	1.26
  +++ ap_buckets.c	2000/10/16 14:08:21	1.27
  @@ -64,29 +64,6 @@
   
   static apr_array_header_t *bucket_types;
   
  -AP_DECLARE(apr_status_t) ap_bucket_destroy(ap_bucket *e)
  -{
  -    e->type->destroy(e->data);
  -    free(e);
  -    return APR_SUCCESS;
  -}
  -
  -AP_DECLARE(apr_status_t) ap_bucket_read(ap_bucket *e, const char **str, 
  -                                        apr_ssize_t *len, int block)
  -{
  -    return e->type->read(e, str, len, block);
  -}
  -
  -AP_DECLARE(apr_status_t) ap_bucket_setaside(ap_bucket *e)
  -{
  -    return e->type->setaside(e);
  -}
  -
  -AP_DECLARE(apr_status_t) ap_bucket_split(ap_bucket *e, apr_off_t point)
  -{
  -    return e->type->split(e, point);
  -}
  -
   static apr_status_t ap_brigade_cleanup(void *data)
   {
       ap_bucket_brigade *b = data;
  
  
  
  1.40      +9 -6      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.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- ap_buckets.h	2000/10/16 06:29:38	1.39
  +++ ap_buckets.h	2000/10/16 14:08:23	1.40
  @@ -470,9 +470,13 @@
    * free the resources used by a bucket. If multiple buckets refer to
    * the same resource it is freed when the last one goes away.
    * @param e The bucket to destroy
  - * @deffunc apr_status_t ap_bucket_destroy(ap_bucket *e)
  + * @deffunc void ap_bucket_destroy(ap_bucket *e)
    */
  -AP_DECLARE(apr_status_t) ap_bucket_destroy(ap_bucket *e);
  +#define ap_bucket_destroy(e) \
  +    { \
  +    e->type->destroy(e->data); \
  +    free(e); \
  +    }
   
   /**
    * read the data from the bucket
  @@ -482,8 +486,7 @@
    * @param block Whether the read function blocks
    * @deffunc apr_status_t ap_bucket_read(ap_bucket *e, const char **str, apr_ssize_t *len,
int block)
    */
  -AP_DECLARE(apr_status_t) ap_bucket_read(ap_bucket *e, const char **str,
  -                                        apr_ssize_t *len, int block);
  +#define ap_bucket_read(e,str,len,block) e->type->read(e, str, len, block)
   
   /**
    * Setaside data so that stack data is not destroyed on returning from
  @@ -491,7 +494,7 @@
    * @param e The bucket to setaside
    * @deffunc apr_status_t ap_bucket_setaside(ap_bucket *e)
    */
  -AP_DECLARE(apr_status_t) ap_bucket_setaside(ap_bucket *e);
  +#define ap_bucket_setaside(e) e->type->setaside(e)
   
   /**
    * Split one bucket in two.
  @@ -499,7 +502,7 @@
    * @param point The location to split the bucket at
    * @deffunc apr_status_t ap_bucket_split(ap_bucket *e, apr_off_t point)
    */
  -AP_DECLARE(apr_status_t) ap_bucket_split(ap_bucket *e, apr_off_t point);
  +#define ap_bucket_split(e,point) e->type->split(e, point)
   
   
   /* Bucket type handling */
  
  
  

Mime
View raw message