This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Teach Perl_do_sv_dump how to cope with IOs that have bogus things in
[perl5.git] / cop.h
diff --git a/cop.h b/cop.h
index 81712fa..a6749a0 100644 (file)
--- a/cop.h
+++ b/cop.h
@@ -146,8 +146,12 @@ struct cop {
     U32                cop_seq;        /* parse sequence number */
     I32                cop_arybase;    /* array base this line was compiled with */
     line_t      cop_line;       /* line # of this command */
-    SV *       cop_warnings;   /* lexical warnings bitmask */
+    /* Beware. mg.c and warnings.pl assume the type of this is STRLEN *:  */
+    STRLEN *   cop_warnings;   /* lexical warnings bitmask */
     SV *       cop_io;         /* lexical IO defaults */
+    /* compile time state of %^H.  See the comment in op.c for how this is
+       used to recreate a hash to return from caller.  */
+    struct refcounted_he * cop_hints;
 };
 
 #ifdef USE_ITHREADS
@@ -226,6 +230,18 @@ struct cop {
 #  define OutCopFILE(c) CopFILE(c)
 #endif
 
+/* CopARYBASE is likely to be removed soon.  */
+#define CopARYBASE(c)          ((c)->cop_arybase)
+#define CopARYBASE_get(c)      ((c)->cop_arybase + 0)
+#define CopARYBASE_set(c, b)   STMT_START { (c)->cop_arybase = (b); } STMT_END
+
+/* 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
+
 /*
  * Here we have some enormously heavy (or at least ponderous) wizardry.
  */
@@ -805,3 +821,13 @@ See L<perlcall/Lightweight Callbacks>.
        CATCH_SET(multicall_oldcatch);                                  \
        LEAVE;                                                          \
     } STMT_END
+
+/*
+ * Local variables:
+ * c-indentation-style: bsd
+ * c-basic-offset: 4
+ * indent-tabs-mode: t
+ * End:
+ *
+ * ex: set ts=8 sts=4 sw=4 noet:
+ */