Git.pm: Remove PerlIO usage from Git.xs

PerlIO_*() is not portable before 5.7.3, according to ppport.h, and it's
more clear what is going on when we do it in the Perl part of the Git module
anyway.

Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Petr Baudis
2006-07-02 01:38:56 +02:00
committed by Junio C Hamano
parent b9795608c4
commit e6634ac984
2 changed files with 38 additions and 32 deletions

View File

@ -511,7 +511,19 @@ are involved.
=cut
# Implemented in Git.xs.
sub hash_object {
my ($self, $type, $file) = _maybe_self(@_);
# hash_object_* implemented in Git.xs.
if (ref($file) eq 'GLOB') {
my $hash = hash_object_pipe($type, fileno($file));
close $file;
return $hash;
} else {
hash_object_file($type, $file);
}
}