This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Disallow GIMME in ext/
authorFather Chrysostomos <sprout@cpan.org>
Sat, 20 Dec 2014 15:14:01 +0000 (07:14 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 21 Dec 2014 15:06:14 +0000 (07:06 -0800)
It’s an inefficient macro, so we don’t want it inadvertently
used again.

op.h

diff --git a/op.h b/op.h
index 2487ca7..a84a02b 100644 (file)
--- a/op.h
+++ b/op.h
@@ -150,7 +150,7 @@ Deprecated.  Use C<GIMME_V> instead.
 #define OPf_LIST       OPf_WANT_LIST
 #define OPf_KNOW       OPf_WANT
 
-#ifndef PERL_CORE
+#if !defined(PERL_CORE) && !defined(PERL_EXT)
 #  define GIMME \
          (PL_op->op_flags & OPf_WANT                                   \
           ? ((PL_op->op_flags & OPf_WANT) == OPf_WANT_LIST             \