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

Comparing EV/typemap (file contents):
Revision 1.3 by root, Sun Oct 28 06:37:39 2007 UTC vs.
Revision 1.8 by root, Wed Oct 31 18:28:00 2007 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines