Implement PictureTag and (partially) Head
[audio-opusfile.git] / typemap
diff --git a/typemap b/typemap
index 1181bcfe236ab4aba1e6a21630134b25303e5c12..c780241374648cc7c32c81972a485c01a2858840 100644 (file)
--- a/typemap
+++ b/typemap
@@ -1,9 +1,11 @@
-const OggOpusFile* T_OGG_OPUS_FILE
-      OggOpusFile* T_OGG_OPUS_FILE
-const OpusHead*    T_OPUS_HEAD
-      OpusHead*    T_OPUS_HEAD
-const OpusTags*    T_OPUS_TAGS
-      OpusTags*    T_OPUS_TAGS
+const OggOpusFile*    T_OGG_OPUS_FILE
+      OggOpusFile*    T_OGG_OPUS_FILE
+const OpusHead*       T_OPUS_HEAD
+      OpusHead*       T_OPUS_HEAD
+const OpusTags*       T_OPUS_TAGS
+      OpusTags*       T_OPUS_TAGS
+const OpusPictureTag* T_OPUS_PICTURE_TAG
+      OpusPictureTag* T_OPUS_PICTURE_TAG
 
 INPUT
 # All three types are copies of T_PTROBJ, only difference being the class name
@@ -38,6 +40,16 @@ T_OPUS_TAGS
                        ${$ALIAS?\q[GvNAME(CvGV(cv))]:\qq[\"$pname\"]},
                        \"$var\", \"Audio::Opusfile::Tags\")
 
+T_OPUS_PICTURE_TAG
+       if (SvROK($arg) && sv_derived_from($arg, \"Audio::Opusfile::PictureTag\")) {
+               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\", \"Audio::Opusfile::Tags\")
+
 OUTPUT
 
 T_OGG_OPUS_FILE
@@ -48,3 +60,6 @@ T_OPUS_HEAD
 
 T_OPUS_TAGS
        sv_setref_pv($arg, \"Audio::Opusfile::Tags\", (void*)$var);
+
+T_OPUS_PICTURE_TAG
+       sv_setref_pv($arg, \"Audio::Opusfile::PictureTag\", (void*)$var);
This page took 0.010224 seconds and 4 git commands to generate.