ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/IO-AIO/AIO.xs
(Generate patch)

Comparing IO-AIO/AIO.xs (file contents):
Revision 1.272 by root, Wed Jan 2 16:32:57 2019 UTC vs.
Revision 1.273 by root, Mon Mar 4 10:28:38 2019 UTC

817 } 817 }
818 else 818 else
819 PUSHs (sv_result); 819 PUSHs (sv_result);
820 break; 820 break;
821 821
822#if 0
823 case EIO_CLOSE:
824 PerlIOUnix_refcnt_dec (req->int1);
825 break;
826#endif
827
822 case EIO_DUP2: /* EIO_DUP2 actually means aio_close(), so fudge result value */ 828 case EIO_DUP2: /* EIO_DUP2 actually means aio_close(), so fudge result value */
823 if (req->result > 0) 829 if (req->result > 0)
824 SvIV_set (sv_result, 0); 830 SvIV_set (sv_result, 0);
825 /* FALLTHROUGH */ 831 /* FALLTHROUGH */
826 832
1472 1478
1473void 1479void
1474aio_close (SV *fh, SV *callback = &PL_sv_undef) 1480aio_close (SV *fh, SV *callback = &PL_sv_undef)
1475 PPCODE: 1481 PPCODE:
1476{ 1482{
1483 int fd = s_fileno_croak (fh, 0);
1477 dREQ; 1484 dREQ;
1478 int fd = s_fileno_croak (fh, 0); 1485#if 0
1479
1480 /* partially duplicate logic in s_fileno */ 1486 /* partially duplicate logic in s_fileno */
1481 SvGETMAGIC (fh); 1487 SvGETMAGIC (fh);
1482 1488
1483 if (SvROK (fh)) 1489 if (SvROK (fh))
1484 { 1490 {
1495 req->type = EIO_CLOSE; 1501 req->type = EIO_CLOSE;
1496 req->int1 = fd; 1502 req->int1 = fd;
1497 /*req->sv2 = newSVsv (fh);*/ /* since we stole the fd, no need to keep the fh */ 1503 /*req->sv2 = newSVsv (fh);*/ /* since we stole the fd, no need to keep the fh */
1498 } 1504 }
1499 else 1505 else
1506#endif
1500 { 1507 {
1501 /* fd number */ 1508 /* fd number */
1502 req->type = EIO_DUP2; 1509 req->type = EIO_DUP2;
1503 req->int1 = close_fd; 1510 req->int1 = close_fd;
1504 req->sv2 = newSVsv (fh); 1511 req->sv2 = newSVsv (fh);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines