]> git.imager.perl.org - imager.git/commitdiff
[rt #69243] move our special typemap entries to the private typemap
authorTony Cook <tony@develop-help.com>
Fri, 24 May 2013 13:11:26 +0000 (23:11 +1000)
committerTony Cook <tony@develop-help.com>
Fri, 24 May 2013 13:11:26 +0000 (23:11 +1000)
typemap
typemap.local

diff --git a/typemap b/typemap
index 907451e3fbed1c6e773285cc541ca42b5f9ca227..83f7152f6c1ff653ac76d9779cd33f0bb3e585a0 100644 (file)
--- a/typemap
+++ b/typemap
@@ -14,11 +14,6 @@ HASH                 T_HVREF
 utf8_str               T_UTF8_STR
 i_img_dim              T_IV
 
-double *               T_AVARRAY
-int *                          T_AVARRAY
-i_img_dim *            T_AVARRAY
-i_color *              T_AVARRAY
-
 # these types are for use by Inline, which can't handle types containing ::
 Imager__Color           T_PTROBJ_INV
 Imager__Color__Float    T_PTROBJ_INV
@@ -81,29 +76,6 @@ T_PTROBJ_INV
         else
             croak(\"$var is not of type ${(my $ntt=$ntype)=~s/__/::/g;\$ntt}\");
 
-T_AVARRAY
-       STMT_START {
-               SV* const xsub_tmp_sv = $arg;
-               SvGETMAGIC(xsub_tmp_sv);
-               if (SvROK(xsub_tmp_sv) && SvTYPE(SvRV(xsub_tmp_sv)) == SVt_PVAV){
-                   AV *xsub_tmp_av = (AV*)SvRV(xsub_tmp_sv);
-                   STRLEN xsub_index;
-                   size_$var = av_len(xsub_tmp_av) + 1;
-                   $var = $ntype(size_$var);
-                   for (xsub_index = 0; xsub_index < size_$var; ++xsub_index) {
-                       SV **sv = av_fetch(xsub_tmp_av, xsub_index, 0);
-                       if (sv) {
-                         ${var}[xsub_index] = Sv${(my $ntt = $ntype) =~ s/Ptr$//; \(ucfirst $ntt)}(*sv, \"$pname\");
-                        }
-                   }
-               }
-               else{
-                   Perl_croak(aTHX_ \"%s: %s is not an ARRAY reference\",
-                               ${$ALIAS?\q[GvNAME(CvGV(cv))]:\qq[\"$pname\"]},
-                               \"$var\");
-               }
-       } STMT_END
-
 
 #############################################################################
 OUTPUT
index c738af77a0480701c418a1d4c8729642aac2740a..bd15d4aac81e64757e847ac27a1315db7508e09e 100644 (file)
@@ -12,6 +12,13 @@ Imager::Internal::Hlines T_PTROBJ
 
 Imager::Context                 T_PTROBJ
 
+i_palidx               T_IV
+double *               T_AVARRAY
+int *                          T_AVARRAY
+i_img_dim *            T_AVARRAY
+i_color *              T_AVARRAY
+
+
 #############################################################################
 INPUT
 
@@ -102,6 +109,29 @@ T_IM_FSAMPLE_LIST
            croak(\"$pname: no samples provided in $var\");
        }
 
+T_AVARRAY
+       STMT_START {
+               SV* const xsub_tmp_sv = $arg;
+               SvGETMAGIC(xsub_tmp_sv);
+               if (SvROK(xsub_tmp_sv) && SvTYPE(SvRV(xsub_tmp_sv)) == SVt_PVAV){
+                   AV *xsub_tmp_av = (AV*)SvRV(xsub_tmp_sv);
+                   STRLEN xsub_index;
+                   size_$var = av_len(xsub_tmp_av) + 1;
+                   $var = $ntype(size_$var);
+                   for (xsub_index = 0; xsub_index < size_$var; ++xsub_index) {
+                       SV **sv = av_fetch(xsub_tmp_av, xsub_index, 0);
+                       if (sv) {
+                         ${var}[xsub_index] = Sv${(my $ntt = $ntype) =~ s/Ptr$//; \(ucfirst $ntt)}(*sv, \"$pname\");
+                        }
+                   }
+               }
+               else{
+                   Perl_croak(aTHX_ \"%s: %s is not an ARRAY reference\",
+                               ${$ALIAS?\q[GvNAME(CvGV(cv))]:\qq[\"$pname\"]},
+                               \"$var\");
+               }
+       } STMT_END
+
 #############################################################################
 OUTPUT