apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@covalent.net>
Subject Re: cvs commit: apr-util/include apr_buckets.h
Date Wed, 23 Jan 2002 18:46:59 GMT
-1

If flatten reads into memory, you must have len of apr_size_t.

Bill


----- Original Message ----- 
From: <jerenkrantz@apache.org>
To: <apr-util-cvs@apache.org>
Sent: Wednesday, January 23, 2002 12:39 PM
Subject: cvs commit: apr-util/include apr_buckets.h


> jerenkrantz    02/01/23 10:39:21
> 
>   Modified:    buckets  apr_brigade.c
>                include  apr_buckets.h
>   Log:
>   Correct type-safety by changing from apr_size_t to apr_off_t
>   
>   Suggested by: Will Rowe
>   
>   Revision  Changes    Path
>   1.29      +5 -6      apr-util/buckets/apr_brigade.c
>   
>   Index: apr_brigade.c
>   ===================================================================
>   RCS file: /home/cvs/apr-util/buckets/apr_brigade.c,v
>   retrieving revision 1.28
>   retrieving revision 1.29
>   diff -u -r1.28 -r1.29
>   --- apr_brigade.c 22 Jan 2002 07:31:18 -0000 1.28
>   +++ apr_brigade.c 23 Jan 2002 18:39:21 -0000 1.29
>   @@ -222,9 +222,9 @@
>    }
>    
>    APU_DECLARE(apr_status_t) apr_brigade_flatten(apr_bucket_brigade *bb,
>   -                                              char *c, apr_size_t *len)
>   +                                              char *c, apr_off_t *len)
>    {
>   -    apr_size_t actual = 0;
>   +    apr_off_t actual = 0;
>        apr_bucket *b;
>     
>        APR_BRIGADE_FOREACH(b, bb) {
>   @@ -259,8 +259,7 @@
>    APU_DECLARE(char *) apr_brigade_pflatten(apr_bucket_brigade *bb,
>                                             apr_pool_t *pool)
>    {
>   -    apr_off_t tmp;
>   -    apr_size_t actual;
>   +    apr_off_t tmp, actual;
>        char *c;
>    
>        apr_brigade_length(bb, 1, &tmp);
>   @@ -277,9 +276,9 @@
>    APU_DECLARE(apr_status_t) apr_brigade_split_line(apr_bucket_brigade *bbOut,
>                                                     apr_bucket_brigade *bbIn,
>                                                     apr_read_type_e block,
>   -                                                 apr_size_t maxbytes)
>   +                                                 apr_off_t maxbytes)
>    {
>   -    apr_size_t readbytes = 0;
>   +    apr_off_t readbytes = 0;
>    
>        while (!APR_BRIGADE_EMPTY(bbIn)) {
>            const char *pos;
>   
>   
>   
>   1.124     +2 -2      apr-util/include/apr_buckets.h
>   
>   Index: apr_buckets.h
>   ===================================================================
>   RCS file: /home/cvs/apr-util/include/apr_buckets.h,v
>   retrieving revision 1.123
>   retrieving revision 1.124
>   diff -u -r1.123 -r1.124
>   --- apr_buckets.h 22 Jan 2002 07:31:18 -0000 1.123
>   +++ apr_buckets.h 23 Jan 2002 18:39:21 -0000 1.124
>   @@ -697,7 +697,7 @@
>     */
>    APU_DECLARE(apr_status_t) apr_brigade_flatten(apr_bucket_brigade *bb,
>                                                  char *c,
>   -                                              apr_size_t *len);
>   +                                              apr_off_t *len);
>    
>    /**
>     * Returns a pool-allocated string representing a flat bucket brigade
>   @@ -719,7 +719,7 @@
>    APU_DECLARE(apr_status_t) apr_brigade_split_line(apr_bucket_brigade *bbOut,
>                                                     apr_bucket_brigade *bbIn,
>                                                     apr_read_type_e block,
>   -                                                 apr_size_t maxbytes);
>   +                                                 apr_off_t maxbytes);
>    
>    /**
>     * create an iovec of the elements in a bucket_brigade... return number 
>   
>   
>   
> 


Mime
View raw message