perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug MacEachern <do...@covalent.net>
Subject Re: IO, ap_send_fd and APR
Date Wed, 19 Dec 2001 00:26:26 GMT
On Tue, 18 Dec 2001, Stas Bekman wrote:

> While we are on the IO issue, any ideas how can we transform Perl file 
> glob into apr_file_t? apr_file_t is an opaque struct and currently I see 
> no way to convert to apr_file_t other than its apr_file_open function 
> which requires the filepath to be opened, so you cannot dup the opened 
> fh like we do when converting apr_file_t to IO for 5.6.1.

try using apr_os_file_put(), where the apr_os_file_t to pass in would be
the value returned from PerlIO_fileno().  like:
apr_os_file_t fd = PerlIO_fileno(fp);
apr_file_t *file;
apr_status_t rc = apr_os_file_put(&file, &fd, pool);



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message