[rt #69243] use the HV * typemap for DSO_call()
authorTony Cook <tony@develop-help.com>
Wed, 22 May 2013 13:35:04 +0000 (23:35 +1000)
committerTony Cook <tony@develop-help.com>
Wed, 22 May 2013 13:35:04 +0000 (23:35 +1000)
Changes
Imager.xs

diff --git a/Changes b/Changes
index 6588a45..00e7e67 100644 (file)
--- a/Changes
+++ b/Changes
@@ -23,6 +23,9 @@ Imager release history.  Older releases can be found in Changes.old
    - The XS for i_map() and i_matrix_transform() now use the AV *
      typemap instead of rolling their own.
 
+   - The XS for DSO_call() now uses the HV * typemap instead of
+     rolling it's own.
+
    - The XS for i_poly_aa(), i_poly_aa_cfill(), i_transform() and
      i_gradgen() now use a new T_AVARRAY typemap that greatly
      simplifies the XS code.
index 05ae303..155e2c5 100644 (file)
--- a/Imager.xs
+++ b/Imager.xs
@@ -2927,12 +2927,8 @@ void
 DSO_call(handle,func_index,hv)
               void*  handle
               int    func_index
-            PREINIT:
-              HV* hv;
+              HV *hv
             PPCODE:
-              if (!SvROK(ST(2))) croak("Imager: Parameter 2 must be a reference to a hash\n");        
-              hv=(HV*)SvRV(ST(2));
-              if (SvTYPE(hv)!=SVt_PVHV) croak("Imager: Parameter 2 must be a reference to a hash\n");
               DSO_call( (DSO_handle *)handle,func_index,hv);
 
 SV *