apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <...@covalent.net>
Subject Re: Buckets code question
Date Wed, 11 Apr 2001 16:45:52 GMT

>
> I'll consider that three +1's on concept... me, Greg Marr (yes?), and
> FirstBill.  I'll touch this up and commit it this afternoon.  I'd also
> like to remove the return NULL; lines in the macro.  There are two ways to
> do that:
>
>    1)  ap__b = NULL; continue;
>    2)  get rid of the malloc failure checking entirely
>    3)  ignore this issue and leave the return NULL's in there.
>
> I prefer #1, but I predict being overruled by the group on this since many
> of you think it's better to segfault than attempt to gracefully handle
> malloc failures.  So assuming #2 is preferred by the group, does everyone
> like the following as the new apr_bucket_do_create macro?
>
> #define apr_bucket_do_create(ap__b,do_make)     \
>     do {                                        \
>         apr_bucket *b;                          \
>         b = calloc(1, sizeof(*b));              \
>         ap__b = do_make;                        \
>         APR_RING_ELEM_INIT(ap__b, link);        \
>     } while(0)

+1

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Mime
View raw message