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.277 by root, Wed Apr 3 03:09:04 2019 UTC vs.
Revision 1.278 by root, Fri Sep 6 22:03:08 2019 UTC

2495 RETVAL = 0; 2495 RETVAL = 0;
2496#endif 2496#endif
2497 OUTPUT: 2497 OUTPUT:
2498 RETVAL 2498 RETVAL
2499 2499
2500void
2501accept4 (aio_rfd rfh, SV *sockaddr, int salen, int flags)
2502 PPCODE:
2503{
2504 SV *retval;
2505#if HAVE_ACCEPT4
2506 socklen_t salen_ = salen ? salen + 1 : 0;
2507
2508 if (salen)
2509 {
2510 sv_upgrade (sockaddr, SVt_PV);
2511 sv_grow (sockaddr, salen_);
2512 }
2513
2514 int res = accept4 (rfh, salen ? (struct sockaddr *)SvPVX (sockaddr) : 0, salen ? &salen_ : 0, flags);
2515
2516 retval = newmortalFH (res, O_RDWR);
2517 sv_dump(retval);
2518
2519 if (res >= 0 && salen > 0)
2520 {
2521 if (salen_ > salen + 1)
2522 salen_ = salen + 1;
2523
2524 SvPOK_only (sockaddr);
2525 SvCUR_set (sockaddr, salen_);
2526 }
2527#else
2528 errno = ENOSYS;
2529 retval = &PL_sv_undef;
2530#endif
2531 XPUSHs (retval);
2532}
2533
2500int 2534int
2501splice (aio_rfd rfh, SV *off_in, aio_wfd wfh, SV *off_out, size_t length, unsigned int flags) 2535splice (aio_rfd rfh, SV *off_in, aio_wfd wfh, SV *off_out, size_t length, unsigned int flags)
2502 CODE: 2536 CODE:
2503{ 2537{
2504#if HAVE_LINUX_SPLICE 2538#if HAVE_LINUX_SPLICE

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines