… | |
… | |
304 | } |
304 | } |
305 | } |
305 | } |
306 | |
306 | |
307 | static int req_invoke (eio_req *req) |
307 | static int req_invoke (eio_req *req) |
308 | { |
308 | { |
309 | dSP; |
|
|
310 | |
|
|
311 | if (req->flags & FLAG_SV2_RO_OFF) |
309 | if (req->flags & FLAG_SV2_RO_OFF) |
312 | SvREADONLY_off (req->sv2); |
310 | SvREADONLY_off (req->sv2); |
313 | |
311 | |
314 | if (!EIO_CANCELLED (req) && req->callback) |
312 | if (!EIO_CANCELLED (req) && req->callback) |
315 | { |
313 | { |
|
|
314 | dSP; |
316 | static SV *sv_result_cache; /* caches the result integer SV */ |
315 | static SV *sv_result_cache; /* caches the result integer SV */ |
317 | SV *sv_result; |
316 | SV *sv_result; |
318 | |
317 | |
319 | ENTER; |
318 | ENTER; |
320 | SAVETMPS; |
319 | SAVETMPS; |
… | |
… | |
497 | SvSETMAGIC (req->sv2); |
496 | SvSETMAGIC (req->sv2); |
498 | PUSHs (sv_result); |
497 | PUSHs (sv_result); |
499 | } |
498 | } |
500 | break; |
499 | break; |
501 | |
500 | |
502 | case EIO_DUP2: |
501 | case EIO_DUP2: /* EIO_DUP2 actually means aio_close(), su fudge result value */ |
503 | if (req->result > 0) |
502 | if (req->result > 0) |
504 | SvIV_set (sv_result, 0); |
503 | SvIV_set (sv_result, 0); |
505 | /* FALLTHROUGH */ |
504 | /* FALLTHROUGH */ |
506 | |
505 | |
507 | default: |
506 | default: |