This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add warning about calling sv_setsv on temp SVs
authorPerl 5 Porters <perl5-porters@africa.nicoh.com>
Fri, 22 Mar 1996 04:52:41 +0000 (04:52 +0000)
committerCharles Bailey <bailey@genetics.upenn.edu>
Fri, 22 Mar 1996 04:52:41 +0000 (04:52 +0000)
pod/perlguts.pod

index 5e8f077..07509bc 100644 (file)
@@ -2008,6 +2008,9 @@ Note that C<sv_setref_pv> copies the pointer while this copies the string.
 =item sv_setsv
 
 Copies the contents of the source SV C<ssv> into the destination SV C<dsv>.
+(B<NOTE:> If C<ssv> has the C<SVs_TEMP> bit set, C<sv_setsv> may simply steal
+the string from C<ssv> and give it to C<dsv>, leaving C<ssv> empty.
+Caveat caller.)
 
        void    sv_setsv _((SV* dsv, SV* ssv));