CVS patchset: 6696
CVS date: 2003/03/16 23:31:08
my $tag = shift;
my $key = shift;
- my $self = bless { }, $class;
+ my $self = bless { db => $db }, $class;
$self->{c_iter} = RPM2::C::DB::_init_iterator($db->{c_db},
$RPM2::header_tag_map{$tag},
$key || "",
return @ret;
}
+# make sure c_iter is destroyed before {db} so that we always free an
+# iterator before we free the db it came from
+
+sub DESTROY {
+ my $self = shift;
+ delete $self->{c_iter};
+}
+
# Preloaded methods go here.
1;