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

Comparing EV/typemap (file contents):
Revision 1.2 by root, Fri Oct 26 16:50:05 2007 UTC vs.
Revision 1.7 by root, Wed Oct 31 10:50:05 2007 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines