Ticket #647: x.patch

File x.patch, 911 bytes (added by Dmitry Karasik, 10 years ago)
  • (a) a vs. (b) b

    a b  
    1 my %subrefs;
    2          
    3 use Data::Dumper;
    4 sub add_valuerangeprocessor {
    5   my ($self, $vrp) = @_;
    6   push @{$subrefs{$$self}}, $vrp; # keep a reference
    7   $self->add_valuerangeprocessor0($vrp);
    8 }
    9  
    10 sub set_stopper {
    11   my ($self, $stopper) = @_;
    12   push @{$subrefs{$$self}}, $stopper; # keep a reference
    13   $self->set_stopper0($stopper);
    14 }
    15  
    16 sub _delete_subrefs { delete $subrefs{${$_[0]}} }
     1my (%vrps,%stoppers);
     2
     3sub add_valuerangeprocessor {
     4  my ($self, $vrp) = @_;
     5  push @{$vrps{$$self}}, $vrp; # keep a reference
     6  $self->add_valuerangeprocessor0($vrp);
     7}
     8
     9sub set_stopper {
     10  my ($self, $stopper) = @_;
     11  $stoppers{$$self} = $stopper; # keep a reference
     12  $self->set_stopper0($stopper);
     13}
     14
     15sub _delete_subrefs {
     16  delete $vrps{${$_[0]}};
     17  delete $stoppers{${$_[0]}};