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

Comparing EV/EV.xs (file contents):
Revision 1.162 by root, Tue Jan 15 21:49:38 2013 UTC vs.
Revision 1.163 by root, Wed Apr 3 23:46:45 2013 UTC

12static int 12static int
13sv_fileno (SV *fh) 13sv_fileno (SV *fh)
14{ 14{
15 return s_fileno (fh, 0); 15 return s_fileno (fh, 0);
16} 16}
17
18#ifndef GvCV_set
19# define GvCV_set(gv,cv) GvCV (gv) = cv
20#endif
17 21
18#define EV_STANDALONE 1 22#define EV_STANDALONE 1
19#define EV_PROTOTYPES 1 23#define EV_PROTOTYPES 1
20#define EV_USE_NANOSLEEP EV_USE_MONOTONIC 24#define EV_USE_NANOSLEEP EV_USE_MONOTONIC
21#define EV_USE_FLOOR 1 25#define EV_USE_FLOOR 1
381 const_iv (EV_, SIGNAL) 385 const_iv (EV_, SIGNAL)
382 const_iv (EV_, CHILD) 386 const_iv (EV_, CHILD)
383 const_iv (EV_, STAT) 387 const_iv (EV_, STAT)
384 const_iv (EV_, IDLE) 388 const_iv (EV_, IDLE)
385 const_iv (EV_, PREPARE) 389 const_iv (EV_, PREPARE)
386 const_iv (EV_, CHECK) 390 /*const_iv (EV_, CHECK) needs special tretament */
387 const_iv (EV_, EMBED) 391 const_iv (EV_, EMBED)
388 const_iv (EV_, FORK) 392 const_iv (EV_, FORK)
389 const_iv (EV_, CLEANUP) 393 const_iv (EV_, CLEANUP)
390 const_iv (EV_, ASYNC) 394 const_iv (EV_, ASYNC)
391 const_iv (EV_, CUSTOM) 395 const_iv (EV_, CUSTOM)
425#endif 429#endif
426 }; 430 };
427 431
428 for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ > const_iv; civ--) 432 for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ > const_iv; civ--)
429 newCONSTSUB (stash, (char *)civ[-1].name, newSViv (civ[-1].iv)); 433 newCONSTSUB (stash, (char *)civ[-1].name, newSViv (civ[-1].iv));
434
435 /* since this clashes with perl CHECK blocks, */
436 /* but we are interested in constants, */
437 /* and not blocks, we treat CHECK specially. */
438 {
439 /* the local $^W = 0 takes care of the warning */
440 CV *cv = newCONSTSUB (stash, "CHECK", newSViv (EV_CHECK));
441 /* now we need to re-set the gv, in case it was hijacked */
442 GvCV_set (gv_fetchpv ("EV::CHECK", GV_ADD, SVt_PVCV), cv);
443 }
430 444
431 stash_loop = gv_stashpv ("EV::Loop" , 1); 445 stash_loop = gv_stashpv ("EV::Loop" , 1);
432 stash_watcher = gv_stashpv ("EV::Watcher" , 1); 446 stash_watcher = gv_stashpv ("EV::Watcher" , 1);
433 stash_io = gv_stashpv ("EV::IO" , 1); 447 stash_io = gv_stashpv ("EV::IO" , 1);
434 stash_timer = gv_stashpv ("EV::Timer" , 1); 448 stash_timer = gv_stashpv ("EV::Timer" , 1);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines