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 do...@hyperreal.org on 1998/11/04 03:28:53 UTC

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

dougm       98/11/03 18:28:52

  Modified:    .        Changes
               Table    Table.pm
               src/modules/perl perl_util.c
  Log:
  plugged leak in mod_perl_tie_table()
  
  methods that return an Apache::Table object no longer attempt to
  'require Apache::Table' for you
  
  Revision  Changes    Path
  1.185     +6 -1      modperl/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /export/home/cvs/modperl/Changes,v
  retrieving revision 1.184
  retrieving revision 1.185
  diff -u -r1.184 -r1.185
  --- Changes	1998/11/02 19:31:40	1.184
  +++ Changes	1998/11/04 02:28:50	1.185
  @@ -8,7 +8,12 @@
   
   =item 1.16_01-dev
   
  -rename PERL_VERSION macro to PERLV to avoid conflict with 5.00502's 
  +plugged leak in mod_perl_tie_table()
  +
  +methods that return an Apache::Table object no longer attempt to
  +'require Apache::Table' for you
  +
  +rename PERL_VERSION macro to PERLV to avoid possibl future conflict
   
   rename Apache::Tie/Apache::TieHashTable -> Apache::Table
   
  
  
  
  1.3       +2 -0      modperl/Table/Table.pm
  
  Index: Table.pm
  ===================================================================
  RCS file: /export/home/cvs/modperl/Table/Table.pm,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Table.pm	1998/10/30 02:40:02	1.2
  +++ Table.pm	1998/11/04 02:28:51	1.3
  @@ -20,6 +20,8 @@
   
   =head1 SYNOPSIS
   
  +    use Apache::Table ();
  +
       my $headers_out = $r->headers_out;
       while(my($key,$val) = each %$headers_out) {
       ...
  
  
  
  1.20      +2 -4      modperl/src/modules/perl/perl_util.c
  
  Index: perl_util.c
  ===================================================================
  RCS file: /export/home/cvs/modperl/src/modules/perl/perl_util.c,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- perl_util.c	1998/10/29 20:53:31	1.19
  +++ perl_util.c	1998/11/04 02:28:52	1.20
  @@ -214,13 +214,11 @@
   
   SV *mod_perl_tie_table(table *t)
   {
  -    HV *hv;
  +    HV *hv = newHV();
       SV *sv = sv_newmortal();
  -    iniHV(hv);
       sv_setref_pv(sv, "Apache::table", (void*)t);
  -    perl_qrequire_module("Apache::Table");
       perl_tie_hash(hv, "Apache::Table", sv);
  -    return sv_bless(newRV_noinc((SV*)hv), 
  +    return sv_bless(sv_2mortal(newRV_noinc((SV*)hv)), 
   		    gv_stashpv("Apache::Table", TRUE));
   }