You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Cliff Woolley <cl...@yahoo.com> on 2001/02/19 02:56:07 UTC

RE: cvs commit: apr-util/include apr_buckets.h

> -----Original Message-----
> jwoolley    01/02/18 17:42:57
>
>   Modified:    include  apr_buckets.h
>   Log:
>   Add apr_bucket_delete(), which is a wrapper macro around bucket removal/
>   destruction.  Useful for decreasing code verbosity.

I decided to go the route of adding a third macro (apr_bucket_delete()) instead
of overloading apr_bucket_destroy().  It's nice to have access to the "atomic"
removal and destruction functions if you really need them, and also I tend to
think of destruction as "just get rid of the damned thing, don't be nice about
it".  "delete" is the nice way to "destroy".  <shrug>

Anyway, all sequences like this:

    APR_BUCKET_REMOVE(e);
    apr_bucket_destroy(e);

can now become:

    apr_bucket_delete(e);

I'll work on a cleanup patch for Apache.  (I've also got that
APR_BUCKET_INSERT_BEFORE(a,b) cleanup patch that's in the works.)


--Cliff

---------------------------------------------------
    Cliff Woolley
    cliffwoolley@yahoo.com
    804-244-8615
    Charlottesville, VA