From: Nicholas Clark Date: Wed, 1 Feb 2006 22:39:29 +0000 (+0000) Subject: References can't have SVp_IOK or SVp_NOK set, so no need for all the X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=dfd48732bfcc9b134193e8c9ab5ae5983f431856;p=p5sagit%2Fp5-mst-13.2.git References can't have SVp_IOK or SVp_NOK set, so no need for all the conditional code to copy IVX and NVX if true. "You cannot get here". p4raw-id: //depot/perl@27045 --- diff --git a/sv.c b/sv.c index 9afb6ce..1de32da 100644 --- a/sv.c +++ b/sv.c @@ -3263,18 +3263,11 @@ Perl_sv_setsv_flags(pTHX_ SV *dstr, register SV *sstr, I32 flags) } (void)SvOK_off(dstr); SvRV_set(dstr, SvREFCNT_inc(SvRV(sstr))); - SvFLAGS(dstr) |= sflags & (SVf_IOK|SVp_IOK|SVf_NOK|SVp_NOK|SVf_ROK - |SVf_AMAGIC); - if (sflags & SVp_NOK) { - SvNV_set(dstr, SvNVX(sstr)); - } - if (sflags & SVp_IOK) { - /* Must do this otherwise some other overloaded use of 0x80000000 - gets confused. Probably SVprv_WEAKREF */ - if (sflags & SVf_IVisUV) - SvIsUV_on(dstr); - SvIV_set(dstr, SvIVX(sstr)); - } + SvFLAGS(dstr) |= sflags & (SVf_ROK|SVf_AMAGIC); + assert(!(sflags & SVp_NOK)); + assert(!(sflags & SVp_IOK)); + assert(!(sflags & SVf_NOK)); + assert(!(sflags & SVf_IOK)); } else if (sflags & SVp_POK) { bool isSwipe = 0;