Craig A. Berry [Sun, 1 Feb 2009 21:09:25 +0000 (15:09 -0600)]
The hints are interpreter-specific, and we check them in some
pretty low-level routines, such as time(), gmtime(), and stat(),
where it's possible thread context may not have been initialized
yet (or may have already been torn down).
#define HINT_M_VMSISH_TIME 0x80000000 /* times are local, not UTC */
#define NATIVE_HINTS (PL_hints >> HINT_V_VMSISH) /* used in op.c */
-#define TEST_VMSISH(h) (PL_curcop->op_private & ((h) >> HINT_V_VMSISH))
+#ifdef PERL_IMPLICIT_CONTEXT
+# define TEST_VMSISH(h) (my_perl && (PL_curcop->op_private & ((h) >> HINT_V_VMSISH)))
+#else
+# define TEST_VMSISH(h) (PL_curcop->op_private & ((h) >> HINT_V_VMSISH))
+#endif
#define VMSISH_STATUS TEST_VMSISH(HINT_M_VMSISH_STATUS)
#define VMSISH_TIME TEST_VMSISH(HINT_M_VMSISH_TIME)