This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Defenestrate PAD_DUP
authorFather Chrysostomos <sprout@cpan.org>
Thu, 1 Sep 2011 19:52:06 +0000 (12:52 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Thu, 1 Sep 2011 20:40:58 +0000 (13:40 -0700)
It has been unused in core since d5b1589c and is not used on CPAN.

pad.h

diff --git a/pad.h b/pad.h
index 184b067..6b2164f 100644 (file)
--- a/pad.h
+++ b/pad.h
@@ -322,27 +322,12 @@ ling pad (lvalue) to C<gen>.  Note that C<SvUV_set> is hijacked for this purpose
 
 
 /*
-=for apidoc m|void|PAD_DUP|PADLIST dstpad|PADLIST srcpad|CLONE_PARAMS* param
-Clone a padlist.
-
 =for apidoc m|void|PAD_CLONE_VARS|PerlInterpreter *proto_perl|CLONE_PARAMS* param
 Clone the state variables associated with running and compiling pads.
 
 =cut
 */
 
-
-#define PAD_DUP(dstpad, srcpad, param)                         \
-    if ((srcpad) && !AvREAL(srcpad)) {                         \
-       /* XXX padlists are real, but pretend to be not */      \
-       AvREAL_on(srcpad);                                      \
-       (dstpad) = av_dup_inc((srcpad), param);                 \
-       AvREAL_off(srcpad);                                     \
-       AvREAL_off(dstpad);                                     \
-    }                                                          \
-    else                                                       \
-       (dstpad) = av_dup_inc((srcpad), param);                 
-
 /* NB - we set PL_comppad to null unless it points at a value that
  * has already been dup'ed, ie it points to part of an active padlist.
  * Otherwise PL_comppad ends up being a leaked scalar in code like