pad.c: Document pad_add_anon’s refcounting
authorFather Chrysostomos <sprout@cpan.org>
Fri, 17 Aug 2012 20:39:27 +0000 (13:39 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Fri, 17 Aug 2012 23:45:22 +0000 (16:45 -0700)
pad.c

diff --git a/pad.c b/pad.c
index 6dee52e..331922a 100644 (file)
--- a/pad.c
+++ b/pad.c
@@ -784,6 +784,8 @@ currently-compiling function.
 The function I<func> is linked into the pad, and its C<CvOUTSIDE> link
 to the outer scope is weakened to avoid a reference loop.
 
+One reference count is stolen, so you may need to do C<SvREFCNT_inc(func)>.
+
 I<optype> should be an opcode indicating the type of operation that the
 pad entry is to support.  This doesn't affect operational semantics,
 but is used for debugging.