1 | JSON * T_JSON |
1 | Signal T_SIGNAL |
|
|
2 | |
|
|
3 | struct ev_watcher * T_WATCHER |
|
|
4 | struct ev_io * T_WATCHER |
|
|
5 | struct ev_time * T_WATCHER |
|
|
6 | struct ev_timer * T_WATCHER |
|
|
7 | struct ev_periodic * T_WATCHER |
|
|
8 | struct ev_signal * T_WATCHER |
|
|
9 | struct ev_idle * T_WATCHER |
|
|
10 | struct ev_prepare * T_WATCHER |
|
|
11 | struct ev_check * T_WATCHER |
|
|
12 | struct ev_child * T_WATCHER |
|
|
13 | |
|
|
14 | char * T_PVbyte |
|
|
15 | const char * T_PVbyte |
2 | |
16 | |
3 | INPUT |
17 | INPUT |
4 | |
18 | |
5 | T_JSON |
19 | T_SIGNAL |
|
|
20 | if (($var = sv_signum ($arg)) <= 0) |
|
|
21 | croak (\"'%s' is not a valid signal number or name\", SvPV_nolen ($arg)); |
|
|
22 | |
|
|
23 | T_PVbyte |
|
|
24 | $var = ($type)SvPVbyte_nolen ($arg) |
|
|
25 | |
|
|
26 | T_WATCHER |
6 | if (!(SvROK ($arg) && SvOBJECT (SvRV ($arg)) |
27 | if (!(SvROK ($arg) && SvOBJECT (SvRV ($arg)) |
7 | && SvSTASH (SvRV ($arg)) == JSON_STASH)) |
28 | && (SvSTASH (SvRV ($arg)) == stash_" . ($type =~ /ev_(\S+)/, "$1") . " |
8 | croak (\"object is not of type JSON::XS\"); |
29 | || sv_derived_from ($arg, \"EV::" . ($type =~ /ev_(\S+)/, ucfirst "$1") . "\")))) |
9 | $var = (JSON *)SvPVX (SvRV ($arg)); |
30 | croak (\"object is not of type EV::" . ($type =~ /ev_(\S+)/, ucfirst "$1") . "\"); |
|
|
31 | $var = ($type)SvPVX (SvRV ($arg)); |
|
|
32 | |
|
|
33 | OUTPUT |
|
|
34 | |
|
|
35 | T_PVbyte |
|
|
36 | sv_setpv ((SV *)$arg, $var); |
|
|
37 | |
|
|
38 | T_WATCHER |
|
|
39 | $arg = e_bless ((struct ev_watcher *)$var, stash_${ ($type =~ /ev_(\S+)/, \"$1") }); |
10 | |
40 | |
11 | |
41 | |