This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fix newPVOP() doc re freeing of pv
authorZefram <zefram@fysh.org>
Tue, 14 Nov 2017 12:56:35 +0000 (12:56 +0000)
committerZefram <zefram@fysh.org>
Tue, 14 Nov 2017 12:57:25 +0000 (12:57 +0000)
[perl #127697]

op.c

diff --git a/op.c b/op.c
index befef7c..18631d0 100644 (file)
--- a/op.c
+++ b/op.c
@@ -7193,9 +7193,10 @@ Perl_newGVOP(pTHX_ I32 type, I32 flags, GV *gv)
 
 Constructs, checks, and returns an op of any type that involves an
 embedded C-level pointer (PV).  C<type> is the opcode.  C<flags> gives
-the eight bits of C<op_flags>.  C<pv> supplies the C-level pointer, which
-must have been allocated using C<PerlMemShared_malloc>; the memory will
-be freed when the op is destroyed.
+the eight bits of C<op_flags>.  C<pv> supplies the C-level pointer.
+Depending on the op type, the memory referenced by C<pv> may be freed
+when the op is destroyed.  If the op is of a freeing type, C<pv> must
+have been allocated using C<PerlMemShared_malloc>.
 
 =cut
 */