From: Steve Peters Date: Wed, 9 Jan 2008 21:18:39 +0000 (+0000) Subject: Only code paths in hv_store either XSRETURN_NO or XSRETURN_YES. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3f9706904cac960ab6eb4535c94266e7878f3afb;p=p5sagit%2Fp5-mst-13.2.git Only code paths in hv_store either XSRETURN_NO or XSRETURN_YES. Change the prototype to return void, remove the output to RETVAL (which isn't set anyway), and fix a typo in the code. p4raw-id: //depot/perl@32928 --- diff --git a/ext/Hash/Util/Util.xs b/ext/Hash/Util/Util.xs index 4d7c964..571d48b 100644 --- a/ext/Hash/Util/Util.xs +++ b/ext/Hash/Util/Util.xs @@ -87,7 +87,7 @@ legal_ref_keys(hash) XPUSHs( key ); } -SV* +void hv_store(hvref, key, val) SV* hvref SV* key @@ -98,7 +98,7 @@ hv_store(hvref, key, val) CODE: { if (!SvROK(hvref) || SvTYPE(SvRV(hvref)) != SVt_PVHV) - croak("First argument to alias_hv() must be a hash reference"); + croak("First argument to hv_store() must be a hash reference"); hv = (HV*)SvRV(hvref); SvREFCNT_inc(val); if (!hv_store_ent(hv, key, val, 0)) { @@ -107,7 +107,5 @@ hv_store(hvref, key, val) } else { XSRETURN_YES; } - } - OUTPUT: - RETVAL \ No newline at end of file +