On Wed, 17 May 2000, Jim Winstead wrote:

> Is there some trick to passing an Apache::File to a function from
> an XS module that expects a FILE *?

so long as the xsub uses a FILE *, the typemap will take care of the
magic.  for example, Apache::send_fd() is an xsub that uses the FILE *
typemap:

use Apache::File ();

my $r = shift;

$r->send_http_header;

my $tmp = Apache::File->tmpfile;

print $tmp "hi";

seek $tmp, 0, 0;

$r->send_fd($tmp);

Reply via email to