You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by pg...@apache.org on 2006/11/30 12:20:17 UTC

svn commit: r480890 - in /perl/modperl/trunk: Changes src/modules/perl/mod_perl.c src/modules/perl/modperl_interp.h

Author: pgollucci
Date: Thu Nov 30 03:20:13 2006
New Revision: 480890

URL: http://svn.apache.org/viewvc?view=rev&rev=480890
Log:
o PERL_SYS_TERM() needs a PerlInterpreter 'my_perl' as of 5.9.5

o xmg_magic moved into a union as a space saver.
(note, as stas noted previously this entire kludge needs to be fixed)



Modified:
    perl/modperl/trunk/Changes
    perl/modperl/trunk/src/modules/perl/mod_perl.c
    perl/modperl/trunk/src/modules/perl/modperl_interp.h

Modified: perl/modperl/trunk/Changes
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/Changes?view=diff&rev=480890&r1=480889&r2=480890
==============================================================================
--- perl/modperl/trunk/Changes (original)
+++ perl/modperl/trunk/Changes Thu Nov 30 03:20:13 2006
@@ -12,6 +12,8 @@
 
 =item 2.0.4-dev
 
+Fixes to get bleed-ithread (5.9.5+) to comile again.
+
 =item 2.0.3 November 28, 2006
 
 Prevent things in %INC that are not stat() able

Modified: perl/modperl/trunk/src/modules/perl/mod_perl.c
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/src/modules/perl/mod_perl.c?view=diff&rev=480890&r1=480889&r2=480890
==============================================================================
--- perl/modperl/trunk/src/modules/perl/mod_perl.c (original)
+++ perl/modperl/trunk/src/modules/perl/mod_perl.c Thu Nov 30 03:20:13 2006
@@ -584,6 +584,15 @@
 
 static apr_status_t modperl_sys_term(void *data)
 {
+    /* PERL_SYS_TERM() needs 'my_perl' as of 5.9.5 */
+#ifdef USE_ITHREADS
+# if PERL_REVISION == 5 && \
+  ((PERL_VERSION == 9 && PERL_SUBVERSION > 4) || \
+   PERL_VERSION > 9)
+    modperl_cleanup_data_t *cdata = (modperl_cleanup_data_t *)data;
+    PerlInterpreter *my_perl = (PerlInterpreter *)cdata->data;
+# endif
+#endif
     MP_init_status = 0;
     MP_threads_started = 0;
     MP_post_post_config_phase = 0;

Modified: perl/modperl/trunk/src/modules/perl/modperl_interp.h
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/src/modules/perl/modperl_interp.h?view=diff&rev=480890&r1=480889&r2=480890
==============================================================================
--- perl/modperl/trunk/src/modules/perl/modperl_interp.h (original)
+++ perl/modperl/trunk/src/modules/perl/modperl_interp.h Thu Nov 30 03:20:13 2006
@@ -44,8 +44,15 @@
 #endif
 
 #ifndef HvPMROOT
+# if PERL_REVISION == 5 && \
+    ((PERL_VERSION == 9 && PERL_SUBVERSION > 4) || \
+    PERL_VERSION > 9)
+#define MP_THX_INTERP_SET(thx, interp)                          \
+    ((XPVMG*)SvANY(*Perl_Imodglobal_ptr(thx)))->xmg_u.xmg_magic = (MAGIC*)interp
+# else
 #define MP_THX_INTERP_SET(thx, interp)                          \
     ((XPVMG*)SvANY(*Perl_Imodglobal_ptr(thx)))->xmg_magic = (MAGIC*)interp
+# endif
 #else
 #define MP_THX_INTERP_SET(thx, interp)                          \
     HvPMROOT(*Perl_Imodglobal_ptr(thx)) = (PMOP*)interp



Re: svn commit: r480890 - in /perl/modperl/trunk: Changes src/modules/perl/mod_perl.c src/modules/perl/modperl_interp.h

Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
Geoffrey Young wrote:
>> +    /* PERL_SYS_TERM() needs 'my_perl' as of 5.9.5 */
>> +#ifdef USE_ITHREADS
>> +# if PERL_REVISION == 5 && \
>> +  ((PERL_VERSION == 9 && PERL_SUBVERSION > 4) || \
>> +   PERL_VERSION > 9)
>> +    modperl_cleanup_data_t *cdata = (modperl_cleanup_data_t *)data;
>> +    PerlInterpreter *my_perl = (PerlInterpreter *)cdata->data;
>> +# endif
>> +#endif
> 
> I feel like I've seen this snippet before.
> 
> can this be made into a more generally useful macro for the other places
> we need specific versions of perl?

Probably -- I'm kind of more worried with the "panic: free in wrong 
pool" ocurring at startup in bleed-ithread.  My debugger wasn't playing 
nice last night either and that is likely over my head -- but we'll see 
how I fare.


-- 
------------------------------------------------------------------------
Philip M. Gollucci (pgollucci@p6m7g8.com) 323.219.4708
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/A79997FA F357 0FDD 2301 6296 690F  6A47 D55A 7172 A799 97F

I never had a dream come true
'Til the day that I found you.
Even though I pretend that I've moved on
You'll always be my baby.
I never found the words to say
You're the one I think about each day
And I know no matter where life takes me to
A part of me will always be...
A part of me will always be with you.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: svn commit: r480890 - in /perl/modperl/trunk: Changes src/modules/perl/mod_perl.c src/modules/perl/modperl_interp.h

Posted by Geoffrey Young <ge...@modperlcookbook.org>.
> +    /* PERL_SYS_TERM() needs 'my_perl' as of 5.9.5 */
> +#ifdef USE_ITHREADS
> +# if PERL_REVISION == 5 && \
> +  ((PERL_VERSION == 9 && PERL_SUBVERSION > 4) || \
> +   PERL_VERSION > 9)
> +    modperl_cleanup_data_t *cdata = (modperl_cleanup_data_t *)data;
> +    PerlInterpreter *my_perl = (PerlInterpreter *)cdata->data;
> +# endif
> +#endif

I feel like I've seen this snippet before.

can this be made into a more generally useful macro for the other places
we need specific versions of perl?

--Geoff

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org