… | |
… | |
33 | |
33 | |
34 | /* 5.6.x */ |
34 | /* 5.6.x */ |
35 | #ifndef SvRV_set |
35 | #ifndef SvRV_set |
36 | # define SvRV_set(a,b) SvRV ((a)) = (b) |
36 | # define SvRV_set(a,b) SvRV ((a)) = (b) |
37 | #endif |
37 | #endif |
38 | |
|
|
39 | #if __GNUC__ >= 3 |
|
|
40 | # define expect(expr,value) __builtin_expect ((expr),(value)) |
|
|
41 | #else |
|
|
42 | # define expect(expr,value) (expr) |
|
|
43 | #endif |
|
|
44 | |
|
|
45 | #define expect_false(expr) expect ((expr) != 0, 0) |
|
|
46 | #define expect_true(expr) expect ((expr) != 0, 1) |
|
|
47 | |
38 | |
48 | #define e_loop(w) INT2PTR (struct ev_loop *, SvIVX ((w)->loop)) |
39 | #define e_loop(w) INT2PTR (struct ev_loop *, SvIVX ((w)->loop)) |
49 | |
40 | |
50 | #define WFLAG_KEEPALIVE 1 |
41 | #define WFLAG_KEEPALIVE 1 |
51 | #define WFLAG_UNREFED 2 /* has been unref'ed */ |
42 | #define WFLAG_UNREFED 2 /* has been unref'ed */ |
… | |
… | |
399 | const_iv (EV_, MINPRI) |
390 | const_iv (EV_, MINPRI) |
400 | const_iv (EV_, MAXPRI) |
391 | const_iv (EV_, MAXPRI) |
401 | |
392 | |
402 | const_iv (EV_, UNDEF) |
393 | const_iv (EV_, UNDEF) |
403 | const_iv (EV_, NONE) |
394 | const_iv (EV_, NONE) |
404 | const_iv (EV_, TIMEOUT) |
|
|
405 | const_iv (EV_, READ) |
395 | const_iv (EV_, READ) |
406 | const_iv (EV_, WRITE) |
396 | const_iv (EV_, WRITE) |
|
|
397 | const_iv (EV_, IO) |
|
|
398 | const_iv (EV_, TIMEOUT) |
|
|
399 | const_iv (EV_, TIMER) |
|
|
400 | const_iv (EV_, PERIODIC) |
407 | const_iv (EV_, SIGNAL) |
401 | const_iv (EV_, SIGNAL) |
|
|
402 | const_iv (EV_, CHILD) |
|
|
403 | const_iv (EV_, STAT) |
408 | const_iv (EV_, IDLE) |
404 | const_iv (EV_, IDLE) |
|
|
405 | const_iv (EV_, PREPARE) |
409 | const_iv (EV_, CHECK) |
406 | const_iv (EV_, CHECK) |
|
|
407 | const_iv (EV_, EMBED) |
|
|
408 | const_iv (EV_, FORK) |
|
|
409 | const_iv (EV_, ASYNC) |
|
|
410 | const_iv (EV_, CUSTOM) |
410 | const_iv (EV_, ERROR) |
411 | const_iv (EV_, ERROR) |
411 | |
412 | |
|
|
413 | const_iv (EV, LOOP_NONBLOCK) |
412 | const_iv (EV, LOOP_ONESHOT) |
414 | const_iv (EV, LOOP_ONESHOT) |
|
|
415 | |
413 | const_iv (EV, LOOP_NONBLOCK) |
416 | const_iv (EV, UNLOOP_CANCEL) |
414 | const_iv (EV, UNLOOP_ONE) |
417 | const_iv (EV, UNLOOP_ONE) |
415 | const_iv (EV, UNLOOP_ALL) |
418 | const_iv (EV, UNLOOP_ALL) |
416 | |
419 | |
417 | const_iv (EV, BACKEND_SELECT) |
420 | const_iv (EV, BACKEND_SELECT) |
418 | const_iv (EV, BACKEND_POLL) |
421 | const_iv (EV, BACKEND_POLL) |
… | |
… | |
421 | const_iv (EV, BACKEND_DEVPOLL) |
424 | const_iv (EV, BACKEND_DEVPOLL) |
422 | const_iv (EV, BACKEND_PORT) |
425 | const_iv (EV, BACKEND_PORT) |
423 | const_iv (EV, FLAG_AUTO) |
426 | const_iv (EV, FLAG_AUTO) |
424 | const_iv (EV, FLAG_NOENV) |
427 | const_iv (EV, FLAG_NOENV) |
425 | const_iv (EV, FLAG_FORKCHECK) |
428 | const_iv (EV, FLAG_FORKCHECK) |
|
|
429 | |
|
|
430 | const_iv (EV_, VERSION_MAJOR) |
|
|
431 | const_iv (EV_, VERSION_MINOR) |
426 | }; |
432 | }; |
427 | |
433 | |
428 | for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ-- > const_iv; ) |
434 | for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ-- > const_iv; ) |
429 | newCONSTSUB (stash, (char *)civ->name, newSViv (civ->iv)); |
435 | newCONSTSUB (stash, (char *)civ->name, newSViv (civ->iv)); |
430 | |
436 | |