cvs commit: modperl/src/modules/perl perlio.c

2002-03-23 Thread dougm

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-devm=99909095916498w=2
  -Status:
   
   * Apache-request(bless {r = $r}, 'My::Apache')
   Report: 
http://marc.theaimsgroup.com/?l=apache-modperl-devm=98600785703290w=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

2002-03-18 Thread stas

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