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

Comparing Coro/Coro/typemap (file contents):
Revision 1.3 by root, Mon Jul 23 23:48:05 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 8
10 if (SvROK(arg) && SvTYPE(SvRV(arg)) == SVt_PVHV)
11 {
12 HE *he = hv_fetch_ent((HV *)SvRV(arg), ucoro_state_sv, 0, ucoro_state_hash);
13
14 if (!he)
15 croak (\"${Package}::$func_name() -- $var is a hashref but lacks the \" UCORO_STATE \" key\");
16
17 arg = HeVAL(he);
18 }
19
20 /* must also be changed inside Coro::Cont::yield */
21 if (SvROK(arg) && SvSTASH(SvRV(arg)) == coro_state_stash)
22 $var = ($type) SvIV((SV*)SvRV(arg));
23 else
24 croak (\"${Package}::$func_name() -- $var is not (and contains not) a Coro::State object\");
25 }
26

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines