Change 33020 by [EMAIL PROTECTED] on 2008/01/21 08:23:46

        Encode the G_* to OPf_WANT_* transform, the reverse of OP_GIMME(), in
        a macro OP_GIMME_REVERSE() [so that it could be changed].

Affected files ...

... //depot/perl/op.h#201 edit
... //depot/perl/perl.c#856 edit

Differences ...

==== //depot/perl/op.h#201 (text) ====
Index: perl/op.h
--- perl/op.h#200~32952~        2008-01-11 05:22:35.000000000 -0800
+++ perl/op.h   2008-01-21 00:23:46.000000000 -0800
@@ -70,6 +70,11 @@
         ((op)->op_flags & OPf_WANT) == OPf_WANT_LIST   ? G_ARRAY   : \
         dfl)
 
+#define OP_GIMME_REVERSE(flags)                        \
+       ((flags & G_VOID) ? OPf_WANT_VOID :     \
+       (flags & G_ARRAY) ? OPf_WANT_LIST :     \
+                           OPf_WANT_SCALAR)
+
 /*
 =head1 "Gimme" Values
 

==== //depot/perl/perl.c#856 (text) ====
Index: perl/perl.c
--- perl/perl.c#855~33002~      2008-01-18 08:11:35.000000000 -0800
+++ perl/perl.c 2008-01-21 00:23:46.000000000 -0800
@@ -2583,9 +2583,7 @@
     myop.op_next = NULL;
     if (!(flags & G_NOARGS))
        myop.op_flags |= OPf_STACKED;
-    myop.op_flags |= ((flags & G_VOID) ? OPf_WANT_VOID :
-                     (flags & G_ARRAY) ? OPf_WANT_LIST :
-                     OPf_WANT_SCALAR);
+    myop.op_flags |= OP_GIMME_REVERSE(flags);
     SAVEOP();
     PL_op = (OP*)&myop;
 
@@ -2715,9 +2713,7 @@
        myop.op_flags = OPf_STACKED;
     myop.op_next = NULL;
     myop.op_type = OP_ENTEREVAL;
-    myop.op_flags |= ((flags & G_VOID) ? OPf_WANT_VOID :
-                     (flags & G_ARRAY) ? OPf_WANT_LIST :
-                     OPf_WANT_SCALAR);
+    myop.op_flags |= OP_GIMME_REVERSE(flags);
     if (flags & G_KEEPERR)
        myop.op_flags |= OPf_SPECIAL;
 
End of Patch.

Reply via email to