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

Comparing EV/typemap (file contents):
Revision 1.6 by root, Mon Oct 29 09:00:43 2007 UTC vs.
Revision 1.10 by root, Thu Nov 1 08:10:03 2007 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines