This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
cop.h: Remove obsolete comment
authorFather Chrysostomos <sprout@cpan.org>
Fri, 14 Sep 2012 17:12:33 +0000 (10:12 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Sat, 15 Sep 2012 05:29:46 +0000 (22:29 -0700)
623e6609 (2 Apr 2006) added this to cop.h:

+/* FIXME NATIVE_HINTS if this is changed from op_private (see perl.h)  */
+#define CopHINTS_get(c)                ((c)->op_private + 0)
+#define CopHINTS_set(c, h)     STMT_START {                            \
+                                   (c)->op_private                     \
+                                        = (U8)((h) & HINT_PRIVATE_MASK); \
+                               } STMT_END
+

d5ec2987 (20 May 2006) made this change, ignoring the FIXME:

 /* FIXME NATIVE_HINTS if this is changed from op_private (see perl.h)  */
-#define CopHINTS_get(c)                ((c)->op_private + 0)
+#define CopHINTS_get(c)                ((c)->cop_hints + 0)
 #define CopHINTS_set(c, h)     STMT_START {                            \
-                                   (c)->op_private                     \
-                                        = (U8)((h) & HINT_PRIVATE_MASK); \
+                                   (c)->cop_hints = (h);               \
                                } STMT_END

There is nothing to be fixed here, as vmsish.h uses ->op_private
directly, instead of using the CopHINTS macros.  Even having caller
return cop_hints instead of op_private doesn’t hurt, as newly-created
cops copy the vms hints from PL_hints to op_private.  So assigning
(caller $n)[8] to $^H will still work.

cop.h

diff --git a/cop.h b/cop.h
index e05c89e..4c7b710 100644 (file)
--- a/cop.h
+++ b/cop.h
@@ -544,7 +544,6 @@ be zero.
 /* OutCopFILE() is CopFILE for output (caller, die, warn, etc.) */
 #define OutCopFILE(c) CopFILE(c)
 
-/* FIXME NATIVE_HINTS if this is changed from op_private (see perl.h)  */
 #define CopHINTS_get(c)                ((c)->cop_hints + 0)
 #define CopHINTS_set(c, h)     STMT_START {                            \
                                    (c)->cop_hints = (h);               \