summaryrefslogtreecommitdiff
path: root/typemap
blob: 5011c4f580b045ef68fcae850a0c2596d685923d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
TYPEMAP
 
QRcode * T_QRCODE
QRinput * T_QRINPUT
 
QRencodeMode T_ENUM
QRecLevel T_ENUM
 
INPUT
 
T_QRCODE
if (SvROK($arg) && sv_derived_from($arg, \"Data::QRCode\")) {
    IV tmp = SvIV((SV*)SvRV($arg));
    $var = INT2PTR($type,tmp);
}
else
    Perl_croak_nocontext(\"%s: %s is not of type %s\",
${$ALIAS?\q[GvNAME(CvGV(cv))]:\qq[\"$pname\"]},
\"$var\", \"Data::QRCode\")
 
T_QRINPUT
if (SvROK($arg) && sv_derived_from($arg, \"Data::QRCode::Input\")) {
    IV tmp = SvIV((SV*)SvRV($arg));
    $var = INT2PTR($type,tmp);
}
else
    Perl_croak_nocontext(\"%s: %s is not of type %s\",
${$ALIAS?\q[GvNAME(CvGV(cv))]:\qq[\"$pname\"]},
\"$var\", \"Data::QRCode::Input\")
 
OUTPUT
 
T_QRCODE
sv_setref_pv($arg, \"Data::QRCode\", (void*)$var);
T_QRINPUT
sv_setref_pv($arg, \"Data::QRCode::Input\", (void*)$var);