This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch main in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=226a9bef590ff748cf3ed7d95f0720a0cd8bd984 commit 226a9bef590ff748cf3ed7d95f0720a0cd8bd984 Author: Guillem Jover <[email protected]> AuthorDate: Thu Dec 22 03:20:08 2022 +0100 Dpkg::Compression: Use %COMP directly in functions when it is safe Calling compression_get_property() from these function is wasteful, as we are already guaranteed the compressor is valid, and we are requesting a known property. In addition we are going to be deprecating the function, so better get rid of unnecessary usage early on. --- scripts/Dpkg/Compression.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/Dpkg/Compression.pm b/scripts/Dpkg/Compression.pm index 6c37d4919..fceed7b66 100644 --- a/scripts/Dpkg/Compression.pm +++ b/scripts/Dpkg/Compression.pm @@ -157,7 +157,7 @@ filename based on its file extension. sub compression_guess_from_filename { my $filename = shift; foreach my $comp (compression_get_list()) { - my $ext = compression_get_property($comp, 'file_ext'); + my $ext = $COMP{$comp}{file_ext}; if ($filename =~ /^(.*)\.\Q$ext\E$/) { return $comp; } @@ -230,7 +230,7 @@ sub compression_get_default_level { if (defined $default_compression_level) { return $default_compression_level; } else { - return compression_get_property($default_compression, 'default_level'); + return $COMP{$default_compression}{default_level}; } } -- Dpkg.Org's dpkg

