summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorrillig <rillig>2005-08-01 22:29:13 +0000
committerrillig <rillig>2005-08-01 22:29:13 +0000
commitff425e83a87a6fd4b704b9e4e45992e8219f17c6 (patch)
treedcb36fc68570f2d486416b304e386cd7bbfe8dbd /pkgtools
parentea125f40b8f4a727b93b78c9b5dd5673e145e946 (diff)
downloadpkgsrc-ff425e83a87a6fd4b704b9e4e45992e8219f17c6.tar.gz
Converted PkgLint::FileUtils::Line to use an array instead of a hash for
saving the fields. This gives a 5 percent speed-up.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkglint/files/pkglint.pl16
1 files changed, 8 insertions, 8 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl
index b978a0de2d0..af87c746de9 100644
--- a/pkgtools/pkglint/files/pkglint.pl
+++ b/pkgtools/pkglint/files/pkglint.pl
@@ -11,7 +11,7 @@
# Freely redistributable. Absolutely no warranty.
#
# From Id: portlint.pl,v 1.64 1998/02/28 02:34:05 itojun Exp
-# $NetBSD: pkglint.pl,v 1.224 2005/08/01 21:28:06 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.225 2005/08/01 22:29:13 rillig Exp $
#
# This version contains lots of changes necessary for NetBSD packages
# done by:
@@ -190,21 +190,21 @@ package PkgLint::FileUtil::Line;
#==========================================================================
sub new($$$$) {
my ($class, $file, $lineno, $text) = @_;
- my ($self) = ({});
+ my ($self) = ([]);
bless($self, $class);
- $self->{"file"} = $file;
- $self->{"lineno"} = $lineno;
- $self->{"text"} = $text;
+ $self->[0] = $file;
+ $self->[1] = $lineno;
+ $self->[2] = $text;
return $self;
}
sub file($) {
- return shift(@_)->{"file"};
+ return shift(@_)->[0];
}
sub lineno($) {
- return shift(@_)->{"lineno"};
+ return shift(@_)->[1];
}
sub text($) {
- return shift(@_)->{"text"};
+ return shift(@_)->[2];
}
sub log_error($$) {