Author: stas
Date: Fri Jul  8 12:07:46 2005
New Revision: 209859

URL: http://svn.apache.org/viewcvs?rev=209859&view=rev
Log:
perl blead fix: in 5.9.3 HvPMROOT was completely removed, temporary using 
Perl_Imodglobal_ptr(thx)))->xmg_magic (which fails on perl_clone from ithreads, 
but 
otherwise works). this must be replaced with a better solution once we find it.

Modified:
    perl/modperl/trunk/src/modules/perl/modperl_interp.h

Modified: perl/modperl/trunk/src/modules/perl/modperl_interp.h
URL: 
http://svn.apache.org/viewcvs/perl/modperl/trunk/src/modules/perl/modperl_interp.h?rev=209859&r1=209858&r2=209859&view=diff
==============================================================================
--- perl/modperl/trunk/src/modules/perl/modperl_interp.h (original)
+++ perl/modperl/trunk/src/modules/perl/modperl_interp.h Fri Jul  8 12:07:46 
2005
@@ -27,12 +27,28 @@
  * HvPMROOT will never be used by Perl with PL_modglobal.
  * so we have stolen it as a quick way to stash the interp
  * pointer.
+ *
+ * However in 5.9.3 HvPMROOT was completely removed, so we have moved
+ * to use another struct member that's hopefully won't be used by
+ * anybody else. But if we can find a better place to store the
+ * pointer to the current mod_perl interpreter object it'd be a much
+ * cleaner solution. of course it must be really fast.
  */
+#ifndef HvPMROOT
+#define MP_THX_INTERP_GET(thx)                                  \
+    (modperl_interp_t *) ((XPVMG*)SvANY(*Perl_Imodglobal_ptr(thx)))->xmg_magic
+#else
 #define MP_THX_INTERP_GET(thx) \
     (modperl_interp_t *)HvPMROOT(*Perl_Imodglobal_ptr(thx))
+#endif
 
-#define MP_THX_INTERP_SET(thx, interp) \
+#ifndef HvPMROOT
+#define MP_THX_INTERP_SET(thx, interp)                          \
+    ((XPVMG*)SvANY(*Perl_Imodglobal_ptr(thx)))->xmg_magic = (MAGIC*)interp
+#else
+#define MP_THX_INTERP_SET(thx, interp)                          \
     HvPMROOT(*Perl_Imodglobal_ptr(thx)) = (PMOP*)interp
+#endif
 
 const char *modperl_interp_scope_desc(modperl_interp_scope_e scope);
 


Reply via email to