… | |
… | |
216 | else |
216 | else |
217 | sv_events_cache = sv_events; |
217 | sv_events_cache = sv_events; |
218 | |
218 | |
219 | if (SvTRUE (ERRSV)) |
219 | if (SvTRUE (ERRSV)) |
220 | { |
220 | { |
|
|
221 | SPAGAIN; |
221 | PUSHMARK (SP); |
222 | PUSHMARK (SP); |
222 | PUTBACK; |
223 | PUTBACK; |
223 | call_sv (get_sv ("EV::DIED", 1), G_DISCARD | G_VOID | G_EVAL | G_KEEPERR); |
224 | call_sv (get_sv ("EV::DIED", 1), G_DISCARD | G_VOID | G_EVAL | G_KEEPERR); |
224 | } |
225 | } |
225 | |
226 | |
… | |
… | |
412 | const_iv (EV, BACKEND_KQUEUE) |
413 | const_iv (EV, BACKEND_KQUEUE) |
413 | const_iv (EV, BACKEND_DEVPOLL) |
414 | const_iv (EV, BACKEND_DEVPOLL) |
414 | const_iv (EV, BACKEND_PORT) |
415 | const_iv (EV, BACKEND_PORT) |
415 | const_iv (EV, FLAG_AUTO) |
416 | const_iv (EV, FLAG_AUTO) |
416 | const_iv (EV, FLAG_NOENV) |
417 | const_iv (EV, FLAG_NOENV) |
|
|
418 | const_iv (EV, FLAG_FORKCHECK) |
417 | }; |
419 | }; |
418 | |
420 | |
419 | for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ-- > const_iv; ) |
421 | for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ-- > const_iv; ) |
420 | newCONSTSUB (stash, (char *)civ->name, newSViv (civ->iv)); |
422 | newCONSTSUB (stash, (char *)civ->name, newSViv (civ->iv)); |
421 | |
423 | |
… | |
… | |
985 | RESET (stat, w, (w, SvPVbyte_nolen (w->fh), new_interval)); |
987 | RESET (stat, w, (w, SvPVbyte_nolen (w->fh), new_interval)); |
986 | } |
988 | } |
987 | OUTPUT: |
989 | OUTPUT: |
988 | RETVAL |
990 | RETVAL |
989 | |
991 | |
|
|
992 | void prev (ev_stat *w) |
|
|
993 | ALIAS: |
|
|
994 | stat = 1 |
|
|
995 | attr = 2 |
|
|
996 | PPCODE: |
|
|
997 | { |
|
|
998 | ev_statdata *s = ix ? &w->attr : &w->prev; |
|
|
999 | |
|
|
1000 | if (ix == 1) |
|
|
1001 | ev_stat_stat (w); |
|
|
1002 | else if (!s->st_nlink) |
|
|
1003 | errno = ENOENT; |
|
|
1004 | |
|
|
1005 | PL_statcache.st_dev = s->st_nlink; |
|
|
1006 | PL_statcache.st_ino = s->st_ino; |
|
|
1007 | PL_statcache.st_mode = s->st_mode; |
|
|
1008 | PL_statcache.st_nlink = s->st_nlink; |
|
|
1009 | PL_statcache.st_uid = s->st_uid; |
|
|
1010 | PL_statcache.st_gid = s->st_gid; |
|
|
1011 | PL_statcache.st_rdev = s->st_rdev; |
|
|
1012 | PL_statcache.st_size = s->st_size; |
|
|
1013 | PL_statcache.st_atime = s->st_atime; |
|
|
1014 | PL_statcache.st_mtime = s->st_mtime; |
|
|
1015 | PL_statcache.st_ctime = s->st_ctime; |
|
|
1016 | |
|
|
1017 | if (GIMME_V == G_SCALAR) |
|
|
1018 | XPUSHs (boolSV (s->st_nlink)); |
|
|
1019 | else if (GIMME_V == G_ARRAY && s->st_nlink) |
|
|
1020 | { |
|
|
1021 | EXTEND (SP, 13); |
|
|
1022 | PUSHs (sv_2mortal (newSViv (s->st_dev))); |
|
|
1023 | PUSHs (sv_2mortal (newSViv (s->st_ino))); |
|
|
1024 | PUSHs (sv_2mortal (newSVuv (s->st_mode))); |
|
|
1025 | PUSHs (sv_2mortal (newSVuv (s->st_nlink))); |
|
|
1026 | PUSHs (sv_2mortal (newSViv (s->st_uid))); |
|
|
1027 | PUSHs (sv_2mortal (newSViv (s->st_gid))); |
|
|
1028 | PUSHs (sv_2mortal (newSViv (s->st_rdev))); |
|
|
1029 | PUSHs (sv_2mortal (newSVnv ((NV)s->st_size))); |
|
|
1030 | PUSHs (sv_2mortal (newSVnv (s->st_atime))); |
|
|
1031 | PUSHs (sv_2mortal (newSVnv (s->st_mtime))); |
|
|
1032 | PUSHs (sv_2mortal (newSVnv (s->st_ctime))); |
|
|
1033 | PUSHs (sv_2mortal (newSVuv (4096))); |
|
|
1034 | PUSHs (sv_2mortal (newSVnv ((NV)((s->st_size + 4095) / 4096)))); |
|
|
1035 | } |
|
|
1036 | } |
|
|
1037 | |
990 | #ifndef _WIN32 |
1038 | #ifndef _WIN32 |
991 | |
1039 | |
992 | MODULE = EV PACKAGE = EV::DNS PREFIX = evdns_ |
1040 | MODULE = EV PACKAGE = EV::DNS PREFIX = evdns_ |
993 | |
1041 | |
994 | BOOT: |
1042 | BOOT: |