mirror of
https://github.com/Perl/perl5.git
synced 2026-01-26 16:39:36 +00:00
Perl_hv_common: sv_2mortal(newSVsv()) to sv_mortalcopy_flags()
This commit is contained in:
parent
8294975f8d
commit
91c779a4e6
2
hv.c
2
hv.c
@ -650,7 +650,7 @@ Perl_hv_common(pTHX_ HV *hv, SV *keysv, const char *key, STRLEN klen,
|
||||
if (!keysv) {
|
||||
keysv = newSVpvn_flags(key, klen, SVf_UTF8|SVs_TEMP);
|
||||
} else {
|
||||
keysv = sv_2mortal(newSVsv(keysv));
|
||||
keysv = sv_mortalcopy_flags(keysv, SV_GMAGIC|SV_NOSTEAL);
|
||||
}
|
||||
mg_copy(MUTABLE_SV(hv), sv, (char *)keysv, HEf_SVKEY);
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user