apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Woolley <jwool...@virginia.edu>
Subject Re: apr_buckets_file.c:file_read + XTHREAD
Date Wed, 28 Nov 2001 01:37:23 GMT
On Tue, 27 Nov 2001, Doug MacEachern wrote:

> ok.  then how about a new apr_file_xread() function and changing
> bucket_read to use it?
>
> apr_status_t apr_file_xread(apr_file_t **f, void *buf,
>                             apr_size_t *nbytes, apr_off_t *offset,
>                             apr_pool_t *pool)
> {

Hmmm... doesn't quite seem right.  How would you know when it was
appropriate to call apr_file_xread() rather than apr_file_read()?  When
the file might be XTHREAD.  But that's any time.  :)  So we're really
talking about replacing apr_file_read(), no?  Either this logic would go
at the top of the existing apr_file_read() [whose argument list would
obviously change], or the existing apr_file_read() would become some
function private to APR that we call [we might do it that way to avoid
having to duplicate this logic across all APR platforms, for example].
Still, does it really seem right for apr_file_read() to change the
apr_file_t that was passed to it, not really.  But that doesn't answer the
original question of when you'd call apr_file_xread over apr_file_read...

Anyhow, I'm willing to be convinced that this should be pushed down into
APR from APR-util in some way.  It definitely shouldn't go UP into Apache,
though.

--Cliff

--------------------------------------------------------------
   Cliff Woolley
   cliffwoolley@yahoo.com
   Charlottesville, VA



Mime
View raw message