perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject cvs commit: modperl-2.0/src/modules/perl modperl_perl_global.c modperl_perl_global.h
Date Wed, 07 Apr 2004 02:56:30 GMT
stas        2004/04/06 19:56:30

  Modified:    src/modules/perl modperl_perl_global.c modperl_perl_global.h
  Log:
  bug fix: PL_endav could be uninitialized
  
  Revision  Changes    Path
  1.22      +7 -3      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.21
  retrieving revision 1.22
  diff -u -u -r1.21 -r1.22
  --- modperl_perl_global.c	2 Apr 2004 02:17:45 -0000	1.21
  +++ modperl_perl_global.c	7 Apr 2004 02:56:30 -0000	1.22
  @@ -21,7 +21,7 @@
       globals->inc.gv    = PL_incgv;
       globals->defout.gv = PL_defoutgv;
       globals->rs.sv     = &PL_rs;
  -    globals->end.av    = PL_endav;
  +    globals->end.av    = &PL_endav;
       globals->end.key   = MP_MODGLOBAL_END;
   }
   
  @@ -233,13 +233,17 @@
   static void
   modperl_perl_global_avcv_save(pTHX_ modperl_perl_global_avcv_t *avcv)
   {
  -    modperl_perl_global_avcv_tie(aTHX_ avcv->key, avcv->av);
  +    if (!*avcv->av) {
  +        *avcv->av = newAV();
  +    }
  +
  +    modperl_perl_global_avcv_tie(aTHX_ avcv->key, *avcv->av);
   }
   
   static void
   modperl_perl_global_avcv_restore(pTHX_ modperl_perl_global_avcv_t *avcv)
   {
  -    modperl_perl_global_avcv_untie(aTHX_ avcv->av);
  +    modperl_perl_global_avcv_untie(aTHX_ *avcv->av);
   }
   
   /*
  
  
  
  1.14      +1 -1      modperl-2.0/src/modules/perl/modperl_perl_global.h
  
  Index: modperl_perl_global.h
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_perl_global.h,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -u -r1.13 -r1.14
  --- modperl_perl_global.h	2 Apr 2004 02:17:45 -0000	1.13
  +++ modperl_perl_global.h	7 Apr 2004 02:56:30 -0000	1.14
  @@ -28,7 +28,7 @@
   } modperl_modglobal_key_e;
   
   typedef struct {
  -    AV *av;
  +    AV **av;
       modperl_modglobal_key_e key;
   } modperl_perl_global_avcv_t;
   
  
  
  

Mime
View raw message