ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/Coro/typemap
Revision: 1.2
Committed: Thu Jul 19 04:13:22 2001 UTC (22 years, 11 months ago) by root
Branch: MAIN
Changes since 1.1: +1 -0 lines
Log Message:
*** empty log message ***

File Contents

# Content
1 Coro::State T_PTROBJ
2 Coro::State_or_hashref T_STATE_OR_HASHREF
3
4 INPUT
5
6 T_STATE_OR_HASHREF
7 {
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 /* must also be changed inside Coro::Cont::result */
18 if (sv_derived_from (arg, \"Coro::State\"))
19 $var = ($type) SvIV((SV*)SvRV(arg));
20 else
21 croak (\"${Package}::$func_name() -- $var is not (and contains not) a Coro::State object\");
22 }
23