cvs commit: modperl/src/modules/perl perlio.c
dougm 02/03/23 18:17:10 Modified:.STATUS src/modules/perl perlio.c Log: fix tiehandle fix so it will compile with Perls < 5.6.0 and fold some duplication in the original patch Revision ChangesPath 1.4 +1 -5 modperl/STATUS Index: STATUS === RCS file: /home/cvs/modperl/STATUS,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- STATUS24 Mar 2002 02:07:58 - 1.3 +++ STATUS24 Mar 2002 02:17:09 - 1.4 @@ -1,5 +1,5 @@ mod_perl 1.3 STATUS: - Last modified at [$Date: 2002/03/24 02:07:58 $] + Last modified at [$Date: 2002/03/24 02:17:09 $] Release: @@ -120,10 +120,6 @@ * Apache->server->register_cleanup Report: ? Status: - -* bleedperl TIEHANDLE issues? -Report: http://marc.theaimsgroup.com/?l=apache-modperl-dev&m=99909095916498&w=2 -Status: * Apache->request(bless {r => $r}, 'My::Apache') Report: http://marc.theaimsgroup.com/?l=apache-modperl-dev&m=98600785703290&w=2 1.9 +10 -13modperl/src/modules/perl/perlio.c Index: perlio.c === RCS file: /home/cvs/modperl/src/modules/perl/perlio.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- perlio.c 19 Mar 2002 02:18:02 - 1.8 +++ perlio.c 24 Mar 2002 02:17:10 - 1.9 @@ -51,25 +51,22 @@ #define dHANDLE(name) GV *handle = gv_fetchpv(name, TRUE, SVt_PVIO) -#if (PERL_REVISION == 5 && PERL_VERSION < 7) +#ifdef PERL_REVISION +# if ((PERL_REVISION == 5) && (PERL_VERSION >= 7)) +# define TIEHANDLE_SV(handle) (SV*)GvIOp((SV*)handle) +# endif +#endif -#define TIEHANDLE(name,obj) \ -{ \ - dHANDLE(name); \ - sv_unmagic((SV*)handle, 'q'); \ - sv_magic((SV*)handle, obj, 'q', Nullch, 0); \ -} - -#else +#ifndef TIEHANDLE_SV +# define TIEHANDLE_SV(handle) (SV*)handle +#endif #define TIEHANDLE(name,obj) \ { \ dHANDLE(name); \ - sv_unmagic((SV*)GvIOp((SV*)handle), 'q'); \ - sv_magic((SV*)GvIOp((SV*)handle), obj, 'q', Nullch, 0); \ + sv_unmagic(TIEHANDLE_SV(handle), 'q'); \ + sv_magic(TIEHANDLE_SV(handle), obj, 'q', Nullch, 0); \ } - -#endif #if 0 #define TIED tied_handle
cvs commit: modperl/src/modules/perl perlio.c
stas02/03/18 18:18:02 Modified:.Changes src/modules/perl perlio.c Log: starting from perl 5.7.3 for tied filehandles, tiedscalar magic is applied to the IO slot of the GP rather than the GV itself. adjust the TIEHANDLE macro to work properly under 5.7.3+. [Charles Jardine <[EMAIL PROTECTED]>, Stas Bekman <[EMAIL PROTECTED]>] Revision ChangesPath 1.625 +5 -0 modperl/Changes Index: Changes === RCS file: /home/cvs/modperl/Changes,v retrieving revision 1.624 retrieving revision 1.625 diff -u -r1.624 -r1.625 --- Changes 11 Dec 2001 03:29:43 - 1.624 +++ Changes 19 Mar 2002 02:18:02 - 1.625 @@ -10,6 +10,11 @@ =item 1.26_01-dev +starting from perl 5.7.3 for tied filehandles, tiedscalar magic is applied +to the IO slot of the GP rather than the GV itself. adjust the TIEHANDLE +macro to work properly under 5.7.3+. [Charles Jardine <[EMAIL PROTECTED]>, +Stas Bekman <[EMAIL PROTECTED]>] + added perl_perl_merge_dir_config and array_header2avrv symbols to mod_perl.def for win32 and mod_perl.exp for aix. [Randy Kobes <[EMAIL PROTECTED]>] 1.8 +13 -0 modperl/src/modules/perl/perlio.c Index: perlio.c === RCS file: /home/cvs/modperl/src/modules/perl/perlio.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- perlio.c 13 Jun 2001 21:27:51 - 1.7 +++ perlio.c 19 Mar 2002 02:18:02 - 1.8 @@ -51,12 +51,25 @@ #define dHANDLE(name) GV *handle = gv_fetchpv(name, TRUE, SVt_PVIO) +#if (PERL_REVISION == 5 && PERL_VERSION < 7) + #define TIEHANDLE(name,obj) \ { \ dHANDLE(name); \ sv_unmagic((SV*)handle, 'q'); \ sv_magic((SV*)handle, obj, 'q', Nullch, 0); \ } + +#else + +#define TIEHANDLE(name,obj) \ +{ \ + dHANDLE(name); \ + sv_unmagic((SV*)GvIOp((SV*)handle), 'q'); \ + sv_magic((SV*)GvIOp((SV*)handle), obj, 'q', Nullch, 0); \ +} + +#endif #if 0 #define TIED tied_handle
cvs commit: modperl/src/modules/perl perlio.c
dougm 01/06/13 14:27:54 Modified:.Changes src/modules/perl perlio.c Log: fix to compile with sfio+ithreads Revision ChangesPath 1.594 +2 -0 modperl/Changes Index: Changes === RCS file: /home/cvs/modperl/Changes,v retrieving revision 1.593 retrieving revision 1.594 diff -u -r1.593 -r1.594 --- Changes 2001/06/12 20:45:37 1.593 +++ Changes 2001/06/13 21:27:45 1.594 @@ -10,6 +10,8 @@ =item 1.25_01-dev +fix to compile with sfio+ithreads, thanks to Joe Schaefer for the spot + win32 fixes for apache 1.3.20 [Randy Kobes <[EMAIL PROTECTED]>] adjust perl_clear_symtab() to deal properly bleedperl's version of 1.7 +1 -1 modperl/src/modules/perl/perlio.c Index: perlio.c === RCS file: /home/cvs/modperl/src/modules/perl/perlio.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- perlio.c 2000/08/15 19:36:34 1.6 +++ perlio.c 2001/06/13 21:27:51 1.7 @@ -106,7 +106,7 @@ XPUSHs(perl_bless_request_rec(((Apache_t*)disc)->r)); XPUSHs(sv_2mortal(newSVpv(buffer,n))); PUTBACK; -(void)(*CvXSUB(cv))(cv); +(void)(*CvXSUB(cv))(aTHXo_ cv); FREETMPS; LEAVE; return n;