This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
integrate cfgperl contents into mainline, update Changes
[perl5.git] / perl.h
diff --git a/perl.h b/perl.h
index 7b09171..e5290f9 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -1730,6 +1730,22 @@ typedef pthread_key_t    perl_key;
 #  endif
 #endif
 
+#if defined(PERL_IMPLICIT_CONTEXT) && !defined(PERL_GET_THX)
+#  ifdef USE_THREADS
+#    define PERL_GET_THX               THR
+#  else
+#  ifdef MULTIPLICITY
+#    define PERL_GET_THX               PERL_GET_INTERP
+#  else
+#  ifdef PERL_OBJECT
+#    define PERL_GET_THX               ((CPerlObj*)PERL_GET_INTERP)
+#  else
+#    define PERL_GET_THX               ((void*)0)
+#  endif
+#  endif
+#  endif
+#endif
+
 /* Some unistd.h's give a prototype for pause() even though
    HAS_PAUSE ends up undefined.  This causes the #define
    below to be rejected by the compmiler.  Sigh.