From: Jesse Luehrs Date: Tue, 16 Nov 2010 16:10:36 +0000 (-0600) Subject: we want the values here, not the keys X-Git-Tag: 0.16~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=061b471e44c5994eef6ba465048e3bff652037e5;p=gitmo%2FPackage-Stash-XS.git we want the values here, not the keys --- diff --git a/XS.xs b/XS.xs index db34488..5957b1a 100644 --- a/XS.xs +++ b/XS.xs @@ -193,19 +193,18 @@ void _deconstruct_variable_name(SV *variable, varspec_t *varspec) void _deconstruct_variable_hash(HV *variable, varspec_t *varspec) { HE *val; - STRLEN len; val = hv_fetch_ent(variable, name_key, 0, name_hash); if (!val) croak("The 'name' key is required in variable specs"); - varspec->name = sv_2mortal(newSVhe(val)); + varspec->name = sv_2mortal(newSVsv(HeVAL(val))); val = hv_fetch_ent(variable, type_key, 0, type_hash); if (!val) croak("The 'type' key is required in variable specs"); - varspec->type = string_to_vartype(HePV(val, len)); + varspec->type = string_to_vartype(SvPV_nolen(HeVAL(val))); } int _valid_for_type(SV *value, vartype_t type)