Hi

When using read/sysread you pass variables like $fo->sysread($buf,
$buflen), and the data is returned in buf.
This is magic to me, normally you ought to call sysread like  $fo-
>sysread(\$buf,$buflen), passing a reference/pointer to the buffer.

Apparantly here's some trick, although the variable content is put on
the perl-stack, sysread can decode the reference to the variable.

Looking at it from .xs perspective, you'd get something like

int sysread //OK, this is pseudo xs code.
SV *buf,
SV *buflen

CODE:

and maybe one can get the reference (*buf) to the buf in this case.

Is this how sysread does it? Is there a way to access \$buf from perl
(other than .xs) ?

/me


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to