Skip to content

Commit dda1c95

Browse files
committed
Perldelta for Perl_newSVsv_flags_NN
1 parent c0cb38a commit dda1c95

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

pod/perldelta.pod

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,19 @@ memory saving is unrealistic.
423423
C<sv_vcatpvfn_flags()> now substitutes the Unicode REPLACEMENT CHARACTER
424424
for malformed input. Previously it used the NUL character.
425425

426+
=item *
427+
428+
L<perlapi/C<newSVsv_flags_NN>> is a new function for creating a new SV
429+
and assigning the value(s) of an existing SV to it.
430+
431+
Historically, C<Perl_newSVsv_flags> and C<Perl_sv_mortalcopy_flags> would
432+
pass a new SV head and the original SV to C<Perl_sv_setsv_flags>. However,
433+
the latter contains many branches of no relevance to a fresh SV, so they
434+
now make use of the new function to streamline the process.
435+
436+
C<Perl_newSVsv_flags> is now essentially a NULL pointer check and wrapper
437+
around the new function, so has been moved into F<sv_inline.h>.
438+
426439
=back
427440

428441
=head1 Selected Bug Fixes

0 commit comments

Comments
 (0)