]> git.imager.perl.org - imager.git/blobdiff - typemap
- i_img_pal_new() now releases the image object memory if creation
[imager.git] / typemap
diff --git a/typemap b/typemap
index 52ad53cb8a96e088bb95641e2495c42bb8c0bcfc..abcf4de9233f0550d5bc5a7ed6709d1d021970bb 100644 (file)
--- a/typemap
+++ b/typemap
@@ -11,11 +11,20 @@ float                       T_FLOAT
 float*                 T_ARRAY
 undef_int              T_IV_U
 HASH                   T_HVREF
+utf8_str               T_UTF8_STR
 #############################################################################
 INPUT
 T_PTR_NULL
        if (SvOK($arg)) $var = INT2PTR($type,SvIV($arg));
        else $var = NULL
+
+# the pre-5.8.0 T_AVREF input map was fixed in 5.8.0
+T_AVREF
+        if (SvROK($arg) && SvTYPE(SvRV($arg))==SVt_PVAV)
+            $var = (AV*)SvRV($arg);
+        else
+            Perl_croak(aTHX_ \"$var is not an array reference\")
+
 #############################################################################
 OUTPUT
 T_IV_U