From: Nicholas Clark Date: Sat, 28 Jan 2006 14:46:35 +0000 (+0000) Subject: Merge the IOK and NOK clauses together in sv_setsv_flags. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5d581361370ea6b2ccaa8b33836e4524ded42d12;p=p5sagit%2Fp5-mst-13.2.git Merge the IOK and NOK clauses together in sv_setsv_flags. p4raw-id: //depot/perl@26982 --- diff --git a/sv.c b/sv.c index c8ad602..6895df4 100644 --- a/sv.c +++ b/sv.c @@ -3426,21 +3426,18 @@ Perl_sv_setsv_flags(pTHX_ SV *dstr, register SV *sstr, I32 flags) } } } - else if (sflags & SVp_IOK) { + else if (sflags & (SVp_IOK|SVp_NOK)) { (void)SvOK_off(dstr); - /* XXXX Do we want to set IsUV for IV(ROK)? Be extra safe... */ - SvFLAGS(dstr) |= sflags & (SVf_IOK|SVp_IOK|SVf_IVisUV); - SvIV_set(dstr, SvIVX(sstr)); + SvFLAGS(dstr) |= sflags & (SVf_IOK|SVp_IOK|SVf_IVisUV|SVf_NOK|SVp_NOK); + if (sflags & SVp_IOK) { + /* XXXX Do we want to set IsUV for IV(ROK)? Be extra safe... */ + SvIV_set(dstr, SvIVX(sstr)); + } if (sflags & SVp_NOK) { SvFLAGS(dstr) |= sflags & (SVf_NOK|SVp_NOK); SvNV_set(dstr, SvNVX(sstr)); } } - else if (sflags & SVp_NOK) { - (void)SvOK_off(dstr); - SvFLAGS(dstr) |= sflags & (SVf_NOK|SVp_NOK); - SvNV_set(dstr, SvNVX(sstr)); - } else { if (dtype == SVt_PVGV) { if (ckWARN(WARN_MISC))