ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/EV/typemap
Revision: 1.11
Committed: Sat Nov 24 08:28:10 2007 UTC (16 years, 5 months ago) by root
Branch: MAIN
CVS Tags: rel-1_3
Changes since 1.10: +9 -9 lines
Log Message:
implement keepalive, kill struct

File Contents

# User Rev Content
1 root 1.5 Signal T_SIGNAL
2 root 1.4
3 root 1.11 ev_watcher * T_WATCHER
4     ev_io * T_WATCHER
5     ev_timer * T_WATCHER
6     ev_periodic * T_WATCHER
7     ev_signal * T_WATCHER
8     ev_idle * T_WATCHER
9     ev_prepare * T_WATCHER
10     ev_check * T_WATCHER
11     ev_child * T_WATCHER
12 root 1.7
13 root 1.6 char * T_PVbyte
14     const char * T_PVbyte
15 root 1.1
16     INPUT
17    
18 root 1.5 T_SIGNAL
19     if (($var = sv_signum ($arg)) <= 0)
20     croak (\"'%s' is not a valid signal number or name\", SvPV_nolen ($arg));
21    
22 root 1.6 T_PVbyte
23     $var = ($type)SvPVbyte_nolen ($arg)
24    
25 root 1.7 T_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    
32 root 1.2 OUTPUT
33    
34 root 1.7 T_PVbyte
35     sv_setpv ((SV *)$arg, $var);
36 root 1.2
37 root 1.7 T_WATCHER
38     $arg = e_bless ((struct ev_watcher *)$var, stash_${ ($type =~ /ev_(\S+)/, \"$1") });
39 root 1.1
40 root 1.6