perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From do...@apache.org
Subject cvs commit: modperl-2.0/src/modules/perl modperl_perl_global.c
Date Thu, 15 Nov 2001 01:25:01 GMT
dougm       01/11/14 17:25:00

  Modified:    src/modules/perl modperl_perl_global.c
  Log:
  propagate SvMAGIC of original HV in modperl_perl_global_gvhv_save()
  
  Revision  Changes    Path
  1.14      +7 -0      modperl-2.0/src/modules/perl/modperl_perl_global.c
  
  Index: modperl_perl_global.c
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_perl_global.c,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- modperl_perl_global.c	2001/10/14 18:00:23	1.13
  +++ modperl_perl_global.c	2001/11/15 01:25:00	1.14
  @@ -175,6 +175,7 @@
   {
       U32 mg_flags;
       HV *hv = GvHV(gvhv->gv);
  +    MAGIC *mg = SvMAGIC(hv);
   
       /*
        * there should only be a small number of entries in %ENV
  @@ -194,6 +195,12 @@
       /* reapply magic flags */
       MP_magical_tie(hv, mg_flags);
       MP_magical_tie(gvhv->tmphv, mg_flags);
  +
  +    if (mg && mg->mg_type && !SvMAGIC(gvhv->tmphv)) {
  +        /* propagate SvMAGIC(hv) to SvMAGIC(gvhv->tmphv) */
  +        /* XXX: maybe newHVhv should do this? */
  +        hv_magic(gvhv->tmphv, Nullgv, mg->mg_type);
  +    }
   
       gvhv->orighv = hv;
       GvHV(gvhv->gv) = gvhv->tmphv;
  
  
  

Mime
View raw message