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

Comparing Coro/Coro/typemap (file contents):
Revision 1.1 by root, Sat Jul 14 22:14:21 2001 UTC vs.
Revision 1.4 by root, Sat Aug 11 19:59:19 2001 UTC

2Coro::State_or_hashref T_STATE_OR_HASHREF 2Coro::State_or_hashref T_STATE_OR_HASHREF
3 3
4INPUT 4INPUT
5 5
6T_STATE_OR_HASHREF 6T_STATE_OR_HASHREF
7 { 7 $var = sv_to_coro ($arg, \"${Package}::$func_name()\", \"$var\");
8 SV *arg = $arg;
9 if (SvROK (arg) && SvTYPE(SvRV(arg)) == SVt_PVHV)
10 {
11 SV **state = hv_fetch((HV *)SvRV(arg), \"_coro_state\", 11, 0);
12 if (!state)
13 croak (\"${Package}::$func_name() -- $var is a hashref but lacks the _coro_state key\");
14 arg = *state;
15 }
16
17 if (sv_derived_from (arg, \"Coro::State\"))
18 $var = ($type) SvIV((SV*)SvRV(arg));
19 else
20 croak (\"${Package}::$func_name() -- $var is not (and contains not) a Coro::State object\");
21 }
22 8

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines