IO
view release on metacpan or search on metacpan
else {
ST(0) = &PL_sv_undef;
SvREFCNT_dec(gv);
}
MODULE = IO PACKAGE = IO::Poll
void
_poll(timeout,...)
int timeout;
PPCODE:
{
#ifdef HAS_POLL
const int nfd = (items - 1) / 2;
SV *tmpsv = sv_2mortal(NEWSV(999,nfd * sizeof(struct pollfd)));
/* We should pass _some_ valid pointer even if nfd is zero, but it
* doesn't matter what it is, since we're telling it to not check any fds.
*/
struct pollfd *fds = nfd ? (struct pollfd *)SvPVX(tmpsv) : (struct pollfd *)tmpsv;
int i,j,ret;
for(i=1, j=0 ; j < nfd ; j++) {
void
getlines(...)
ALIAS:
IO::Handle::getline = 1
IO::Handle::gets = 2
INIT:
UNOP myop;
SV *io;
OP *was = PL_op;
PPCODE:
if (items != 1)
Perl_croak(aTHX_ "usage: $io->%s()", ix ? "getline" : "getlines");
if (!ix && GIMME_V != G_LIST)
Perl_croak(aTHX_ "Can't call $io->getlines in a scalar context, use $io->getline");
Zero(&myop, 1, UNOP);
#if PERL_VERSION_GE(5,39,6)
myop.op_flags = (ix ? (OPf_WANT_SCALAR | OPf_STACKED) : OPf_WANT_LIST);
#else
myop.op_flags = (ix ? OPf_WANT_SCALAR : OPf_WANT_LIST ) | OPf_STACKED;
#endif
( run in 0.489 second using v1.01-cache-2.11-cpan-5511b514fd6 )