AW: AW: APR::BucketType bucket types?
[prev]
[thread]
[next]
[Date index for 2005/04/06]
[snip]
> > ok; I didn't think about that...
> > So what is the most efficient way to determine the
> > "standard" bucket types like EOS/EOC/FLUSH?
>
> with is_foo methods:
> http://perl.apache.org/docs/2.0/api/APR/Bucket.html
> though at the moment we expose just two of them. Which ones
> do you lack?
currently only is_eoc().
> > How is is_eos() doing it?
>
> APU_DECLARE_DATA const apr_bucket_type_t apr_bucket_type_eos = {
> "EOS", 5, APR_BUCKET_METADATA,
> apr_bucket_destroy_noop,
> eos_bucket_read,
> apr_bucket_setaside_noop,
> apr_bucket_split_notimpl,
> apr_bucket_simple_copy
> };
>
> #define APR_BUCKET_IS_EOS(e) ((e)->type ==
> &apr_bucket_type_eos)
>
> As you can see apr_bucket_type_eos is a struct, not a
> numerical value. I
> guess since it checks the address, it's possible to present
> it as a constant.
Thanks for the insight.
 |
AW: AW: APR::BucketType bucket types?
Dintelmann, Peter 08:30 on 06 Apr 2005
|