link to the cookbook
[imager.git] / typemap
CommitLineData
02d1d628
AMH
1#i_img * T_PTR_NULL
2Imager::Color T_PTROBJ
faa9b3e7 3Imager::Color::Float T_PTROBJ
02d1d628 4Imager::ImgRaw T_PTROBJ
4b19f77a 5Imager::Font::TT T_PTROBJ
02d1d628 6Imager::IO T_PTROBJ
faa9b3e7 7Imager::Font::FT2 T_PTROBJ
f1ac5027 8Imager::FillHandle T_PTROBJ
02d1d628
AMH
9const char * T_PV
10float T_FLOAT
11float* T_ARRAY
12undef_int T_IV_U
13HASH T_HVREF
1bd75e4c 14utf8_str T_UTF8_STR
02d1d628
AMH
15#############################################################################
16INPUT
17T_PTR_NULL
5997b792 18 if (SvOK($arg)) $var = INT2PTR($type,SvIV($arg));
02d1d628 19 else $var = NULL
e5744e01
TC
20
21# the pre-5.8.0 T_AVREF input map was fixed in 5.8.0
22T_AVREF
23 if (SvROK($arg) && SvTYPE(SvRV($arg))==SVt_PVAV)
24 $var = (AV*)SvRV($arg);
25 else
26 Perl_croak(aTHX_ \"$var is not an array reference\")
27
02d1d628
AMH
28#############################################################################
29OUTPUT
30T_IV_U
31 if ($var == 0) $arg=&PL_sv_undef;
32 else sv_setiv($arg, (IV)$var);
33T_PTR_NULL
34 sv_setiv($arg, (IV)$var);