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

Comparing EV/typemap (file contents):
Revision 1.1 by root, Fri Oct 26 09:19:48 2007 UTC vs.
Revision 1.5 by root, Mon Oct 29 07:56:03 2007 UTC

1JSON * T_JSON 1Base T_BASE
2Event T_EVENT
3Signal T_SIGNAL
4
5/* for 5.6 compatibility */
6const char * T_PV
2 7
3INPUT 8INPUT
4 9
5T_JSON 10T_BASE
6 if (!(SvROK ($arg) && SvOBJECT (SvRV ($arg)) 11 if (!(SvROK ($arg) && SvOBJECT (SvRV ($arg))
7 && SvSTASH (SvRV ($arg)) == JSON_STASH)) 12 && SvSTASH (SvRV ($arg)) == stash_base))
8 croak (\"object is not of type JSON::XS\"); 13 croak (\"object is not of type EV::Base\");
9 $var = (JSON *)SvPVX (SvRV ($arg)); 14 $var = (Base)SvIV (SvRV ($arg));
10 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));
11 21
22T_SIGNAL
23 if (($var = sv_signum ($arg)) <= 0)
24 croak (\"'%s' is not a valid signal number or name\", SvPV_nolen ($arg));
25
26OUTPUT
27
28T_BASE
29 sv_setref_iv ($arg, "EV::Base", (IV)$var);
30
31T_EVENT
32 $arg = e_self ($var);
33

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines