From 75cebca865ed16faae7a73a1e14c909e4f528f35 Mon Sep 17 00:00:00 2001 From: Tony Cook Date: Wed, 22 May 2013 23:35:04 +1000 Subject: [PATCH] [rt #69243] use the HV * typemap for DSO_call() --- Changes | 3 +++ Imager.xs | 6 +----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Changes b/Changes index 6588a453..00e7e676 100644 --- 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. diff --git a/Imager.xs b/Imager.xs index 05ae3036..155e2c5f 100644 --- 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 * -- 2.39.5