Initial commit
[audio-opusfile.git] / typemap
1 const OggOpusFile* T_OGG_OPUS_FILE
2 OggOpusFile* T_OGG_OPUS_FILE
3 const OpusHead* T_OPUS_HEAD
4 OpusHead* T_OPUS_HEAD
5 const OpusTags* T_OPUS_TAGS
6 OpusTags* T_OPUS_TAGS
7
8 INPUT
9 # All three types are copies of T_PTROBJ, only difference being the class name
10
11 T_OGG_OPUS_FILE
12 if (SvROK($arg) && sv_derived_from($arg, \"Audio::Opusfile\")) {
13 IV tmp = SvIV((SV*)SvRV($arg));
14 $var = INT2PTR($type,tmp);
15 }
16 else
17 Perl_croak_nocontext(\"%s: %s is not of type %s\",
18 ${$ALIAS?\q[GvNAME(CvGV(cv))]:\qq[\"$pname\"]},
19 \"$var\", \"Audio::Opusfile\")
20
21 T_OPUS_HEAD
22 if (SvROK($arg) && sv_derived_from($arg, \"Audio::Opusfile::Head\")) {
23 IV tmp = SvIV((SV*)SvRV($arg));
24 $var = INT2PTR($type,tmp);
25 }
26 else
27 Perl_croak_nocontext(\"%s: %s is not of type %s\",
28 ${$ALIAS?\q[GvNAME(CvGV(cv))]:\qq[\"$pname\"]},
29 \"$var\", \"Audio::Opusfile::Head\")
30
31 T_OPUS_TAGS
32 if (SvROK($arg) && sv_derived_from($arg, \"Audio::Opusfile::Tags\")) {
33 IV tmp = SvIV((SV*)SvRV($arg));
34 $var = INT2PTR($type,tmp);
35 }
36 else
37 Perl_croak_nocontext(\"%s: %s is not of type %s\",
38 ${$ALIAS?\q[GvNAME(CvGV(cv))]:\qq[\"$pname\"]},
39 \"$var\", \"Audio::Opusfile::Tags\")
40
41 OUTPUT
42
43 T_OGG_OPUS_FILE
44 sv_setref_pv($arg, \"Audio::Opusfile\", (void*)$var);
45
46 T_OPUS_HEAD
47 sv_setref_pv($arg, \"Audio::Opusfile::Head\", (void*)$var);
48
49 T_OPUS_TAGS
50 sv_setref_pv($arg, \"Audio::Opusfile::Tags\", (void*)$var);
This page took 0.019223 seconds and 4 git commands to generate.