diff options
author | Nicholas Clark <nick@ccl4.org> | 2010-10-18 19:30:12 +0200 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2010-10-18 19:32:26 +0200 |
commit | 96d24b8ce2ce0411b22e29e30ee26700bb1213cf (patch) | |
tree | 6767b189834133a98c2c29aa35615e4a72a9bd3a /ext/Fcntl/Fcntl.pm | |
parent | efe77345f79553ebc2eff1978e461a89d4448f00 (diff) | |
download | perl-96d24b8ce2ce0411b22e29e30ee26700bb1213cf.tar.gz |
Convert Fcntl::S_IS{LNK,SOCK,BLK,CHR,FIFO,WHT,ENFMT} to XS.
This reduces the memory usage of Fcntl by quite a bit, as the same XSUB is used
by all 9 S_IS* functions.
Diffstat (limited to 'ext/Fcntl/Fcntl.pm')
-rw-r--r-- | ext/Fcntl/Fcntl.pm | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/ext/Fcntl/Fcntl.pm b/ext/Fcntl/Fcntl.pm index 76f72265ad..4032e0985d 100644 --- a/ext/Fcntl/Fcntl.pm +++ b/ext/Fcntl/Fcntl.pm @@ -218,14 +218,6 @@ BEGIN { sub S_IFMT { @_ ? ( $_[0] & _S_IFMT() ) : _S_IFMT() } sub S_IMODE { $_[0] & 07777 } -sub S_ISLNK { ( $_[0] & _S_IFMT() ) == S_IFLNK() } -sub S_ISSOCK { ( $_[0] & _S_IFMT() ) == S_IFSOCK() } -sub S_ISBLK { ( $_[0] & _S_IFMT() ) == S_IFBLK() } -sub S_ISCHR { ( $_[0] & _S_IFMT() ) == S_IFCHR() } -sub S_ISFIFO { ( $_[0] & _S_IFMT() ) == S_IFIFO() } -sub S_ISWHT { ( $_[0] & _S_IFMT() ) == S_IFWHT() } -sub S_ISENFMT { ( $_[0] & _S_IFMT() ) == S_ENFMT() } - sub AUTOLOAD { (my $constname = $AUTOLOAD) =~ s/.*:://; die "&Fcntl::constant not defined" if $constname eq 'constant'; |