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 st...@apache.org on 2002/03/19 03:18:02 UTC

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

stas        02/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 <cj...@cam.ac.uk>,
  Stas Bekman <st...@stason.org>]
  
  Revision  Changes    Path
  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 -0000	1.624
  +++ Changes	19 Mar 2002 02:18:02 -0000	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 <cj...@cam.ac.uk>, 
  +Stas Bekman <st...@stason.org>]
  +
   added perl_perl_merge_dir_config and array_header2avrv symbols to
   mod_perl.def for win32 and mod_perl.exp for aix.
   [Randy Kobes <ra...@theoryx5.uwinnipeg.ca>]
  
  
  
  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 -0000	1.7
  +++ perlio.c	19 Mar 2002 02:18:02 -0000	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