Skip to content

Commit c2ecb9d

Browse files
committed
Use sv_vstring_get() internally in sv.c
1 parent 9d0e325 commit c2ecb9d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

sv.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4741,10 +4741,10 @@ Perl_sv_setsv_flags(pTHX_ SV *dsv, SV* ssv, const I32 flags)
47414741
}
47424742
SvFLAGS(dsv) |= sflags & (SVf_IOK|SVp_IOK|SVf_NOK|SVp_NOK|SVf_UTF8);
47434743
{
4744-
const MAGIC * const smg = SvVSTRING_mg(ssv);
4745-
if (smg) {
4746-
sv_magic(dsv, NULL, PERL_MAGIC_vstring,
4747-
smg->mg_ptr, smg->mg_len);
4744+
const char *vstr_pv;
4745+
STRLEN vstr_len;
4746+
if (sv_vstring_get(ssv, &vstr_pv, &vstr_len)) {
4747+
sv_magic(dsv, NULL, PERL_MAGIC_vstring, vstr_pv, vstr_len);
47484748
SvRMAGICAL_on(dsv);
47494749
}
47504750
}

0 commit comments

Comments
 (0)