X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBM%2FDeep%2FSector%2FFile%2FBucketList.pm;h=d218d0d4d1e8175c7827214e57c106a6ad4393bf;hb=641aa32d2d78eb7084801c7b9aa91f962c8af75f;hp=349fa3ac44186959b7c90a092b77e27ed65f7247;hpb=2c70efe15fa947d7e8971691d3e8d55005b4af37;p=dbsrgits%2FDBM-Deep.git diff --git a/lib/DBM/Deep/Sector/File/BucketList.pm b/lib/DBM/Deep/Sector/File/BucketList.pm index 349fa3a..d218d0d 100644 --- a/lib/DBM/Deep/Sector/File/BucketList.pm +++ b/lib/DBM/Deep/Sector/File/BucketList.pm @@ -68,7 +68,7 @@ sub free { # Delete the keysector my $l = unpack( $StP{$e->byte_size}, substr( $rest, $e->hash_size, $e->byte_size ) ); - my $s = DBM::Deep::Sector::File->load( $e, $l ); $s->free if $s; + my $s = $e->load_sector( $l ); $s->free if $s; # Delete the HEAD sector $l = unpack( $StP{$e->byte_size}, @@ -77,7 +77,7 @@ sub free { $e->byte_size, ), ); - $s = DBM::Deep::Sector::File->load( $e, $l ); $s->free if $s; + $s = $e->load_sector( $l ); $s->free if $s; foreach my $txn ( 0 .. $e->num_txns - 2 ) { my $l = unpack( $StP{$e->byte_size}, @@ -86,7 +86,7 @@ sub free { $e->byte_size, ), ); - my $s = DBM::Deep::Sector::File->load( $e, $l ); $s->free if $s; + my $s = $e->load_sector( $l ); $s->free if $s; } } @@ -283,7 +283,7 @@ sub delete_md5 { $key_sector->free; - my $data_sector = DBM::Deep::Sector::File->load( $self->engine, $location ); + my $data_sector = $self->engine->load_sector( $location ); my $data = $data_sector->data({ export => 1 }); $data_sector->free; @@ -350,7 +350,7 @@ sub get_data_for { my $location = $self->get_data_location_for({ allow_head => $args->{allow_head}, }); - return DBM::Deep::Sector::File->load( $self->engine, $location ); + return $self->engine->load_sector( $location ); } sub get_key_for { @@ -369,7 +369,7 @@ sub get_key_for { $location = unpack( $StP{$self->engine->byte_size}, $location ); DBM::Deep->_throw_error( "get_key_for: No location?" ) unless $location; - return DBM::Deep::Sector::File->load( $self->engine, $location ); + return $self->engine->load_sector( $location ); } 1;