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

Comparing EV/EV.xs (file contents):
Revision 1.80 by root, Tue Nov 27 07:27:10 2007 UTC vs.
Revision 1.83 by root, Thu Nov 29 17:28:13 2007 UTC

77 *stash_watcher, 77 *stash_watcher,
78 *stash_io, 78 *stash_io,
79 *stash_timer, 79 *stash_timer,
80 *stash_periodic, 80 *stash_periodic,
81 *stash_signal, 81 *stash_signal,
82 *stash_child,
83 *stash_stat,
82 *stash_idle, 84 *stash_idle,
83 *stash_prepare, 85 *stash_prepare,
84 *stash_check, 86 *stash_check,
85 *stash_child,
86 *stash_embed, 87 *stash_embed,
87 *stash_stat; 88 *stash_fork;
88 89
89#ifndef SIG_SIZE 90#ifndef SIG_SIZE
90/* kudos to Slaven Rezic for the idea */ 91/* kudos to Slaven Rezic for the idea */
91static char sig_size [] = { SIG_NUM }; 92static char sig_size [] = { SIG_NUM };
92# define SIG_SIZE (sizeof (sig_size) + 1) 93# define SIG_SIZE (sizeof (sig_size) + 1)
411 const_iv (EV, BACKEND_KQUEUE) 412 const_iv (EV, BACKEND_KQUEUE)
412 const_iv (EV, BACKEND_DEVPOLL) 413 const_iv (EV, BACKEND_DEVPOLL)
413 const_iv (EV, BACKEND_PORT) 414 const_iv (EV, BACKEND_PORT)
414 const_iv (EV, FLAG_AUTO) 415 const_iv (EV, FLAG_AUTO)
415 const_iv (EV, FLAG_NOENV) 416 const_iv (EV, FLAG_NOENV)
417 const_iv (EV, FLAG_FORKCHECK)
416 }; 418 };
417 419
418 for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ-- > const_iv; ) 420 for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ-- > const_iv; )
419 newCONSTSUB (stash, (char *)civ->name, newSViv (civ->iv)); 421 newCONSTSUB (stash, (char *)civ->name, newSViv (civ->iv));
420 422
984 RESET (stat, w, (w, SvPVbyte_nolen (w->fh), new_interval)); 986 RESET (stat, w, (w, SvPVbyte_nolen (w->fh), new_interval));
985} 987}
986 OUTPUT: 988 OUTPUT:
987 RETVAL 989 RETVAL
988 990
991void prev (ev_stat *w)
992 ALIAS:
993 stat = 1
994 attr = 2
995 PPCODE:
996{
997 ev_statdata *s = ix ? &w->attr : &w->prev;
998
999 if (ix == 1)
1000 ev_stat_stat (w);
1001 else if (!s->st_nlink)
1002 errno = ENOENT;
1003
1004 PL_statcache.st_dev = s->st_nlink;
1005 PL_statcache.st_ino = s->st_ino;
1006 PL_statcache.st_mode = s->st_mode;
1007 PL_statcache.st_nlink = s->st_nlink;
1008 PL_statcache.st_uid = s->st_uid;
1009 PL_statcache.st_gid = s->st_gid;
1010 PL_statcache.st_rdev = s->st_rdev;
1011 PL_statcache.st_size = s->st_size;
1012 PL_statcache.st_atime = s->st_atime;
1013 PL_statcache.st_mtime = s->st_mtime;
1014 PL_statcache.st_ctime = s->st_ctime;
1015
1016 if (GIMME_V == G_SCALAR)
1017 XPUSHs (boolSV (s->st_nlink));
1018 else if (GIMME_V == G_ARRAY && s->st_nlink)
1019 {
1020 EXTEND (SP, 13);
1021 PUSHs (sv_2mortal (newSViv (s->st_dev)));
1022 PUSHs (sv_2mortal (newSViv (s->st_ino)));
1023 PUSHs (sv_2mortal (newSVuv (s->st_mode)));
1024 PUSHs (sv_2mortal (newSVuv (s->st_nlink)));
1025 PUSHs (sv_2mortal (newSViv (s->st_uid)));
1026 PUSHs (sv_2mortal (newSViv (s->st_gid)));
1027 PUSHs (sv_2mortal (newSViv (s->st_rdev)));
1028 PUSHs (sv_2mortal (newSVnv ((NV)s->st_size)));
1029 PUSHs (sv_2mortal (newSVnv (s->st_atime)));
1030 PUSHs (sv_2mortal (newSVnv (s->st_mtime)));
1031 PUSHs (sv_2mortal (newSVnv (s->st_ctime)));
1032 PUSHs (sv_2mortal (newSVuv (4096)));
1033 PUSHs (sv_2mortal (newSVnv ((NV)((s->st_size + 4095) / 4096))));
1034 }
1035}
1036
989#ifndef _WIN32 1037#ifndef _WIN32
990 1038
991MODULE = EV PACKAGE = EV::DNS PREFIX = evdns_ 1039MODULE = EV PACKAGE = EV::DNS PREFIX = evdns_
992 1040
993BOOT: 1041BOOT:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines