Просмотр исходного кода

Dpkg::Shlibs: Rename reset_library_paths() to blank_library_paths()

This will allow to initialize the library paths to be an empty array,
instead of just resetting it after the fact, which means the new name
will make more sense.
Guillem Jover лет назад: 11
Родитель
Сommit
fe4bec2900
2 измененных файлов с 7 добавлено и 7 удалено
  1. 5 5
      scripts/Dpkg/Shlibs.pm
  2. 2 2
      scripts/t/Dpkg_Shlibs.t

+ 5 - 5
scripts/Dpkg/Shlibs.pm

@@ -21,7 +21,7 @@ use warnings;
 our $VERSION = '0.02';
 
 use Exporter qw(import);
-our @EXPORT_OK = qw(add_library_dir get_library_paths reset_library_paths
+our @EXPORT_OK = qw(blank_library_paths add_library_dir get_library_paths
                     find_library);
 
 
@@ -107,6 +107,10 @@ sub parse_ldso_conf {
     close $fh;
 }
 
+sub blank_library_paths {
+    @librarypaths = ();
+}
+
 sub add_library_dir {
     my $dir = shift;
     unshift @librarypaths, $dir;
@@ -116,10 +120,6 @@ sub get_library_paths {
     return @librarypaths;
 }
 
-sub reset_library_paths {
-    @librarypaths = ();
-}
-
 # find_library ($soname, \@rpath, $format, $root)
 sub find_library {
     my ($lib, $rpath, $format, $root) = @_;

+ 2 - 2
scripts/t/Dpkg_Shlibs.t

@@ -26,11 +26,11 @@ my $tmp;
 my @tmp;
 my %tmp;
 
-Dpkg::Shlibs::reset_library_paths();
-
 my $srcdir = $ENV{srcdir} || '.';
 my $datadir = $srcdir . '/t/Dpkg_Shlibs';
 
+Dpkg::Shlibs::blank_library_paths();
+
 # We want relative paths inside the ld.so.conf fragments to work, and $srcdir
 # is usually a relative path, so let's temporarily switch directory.
 # XXX: An alternative would be to make parse_ldso_conf relative path aware.