Skip to content

Commit

Permalink
Merge pull request #120 from timo/use_nqp_const_stat
Browse files Browse the repository at this point in the history
Use nqp::const::stat_...
  • Loading branch information
jnthn committed Apr 10, 2013
2 parents 39cf717 + 4dc8590 commit 17f5e59
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions src/core/IO.pm
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ sub prompt($msg) {

my role IO::FileTestable {
method d() {
self.e && nqp::p6bool(nqp::stat(nqp::unbox_s($.path), pir::const::STAT_ISDIR))
self.e && nqp::p6bool(nqp::stat(nqp::unbox_s($.path), nqp::const::STAT_ISDIR))
}

method e() {
nqp::p6bool(nqp::stat(nqp::unbox_s($.path), pir::const::STAT_EXISTS))
nqp::p6bool(nqp::stat(nqp::unbox_s($.path), nqp::const::STAT_EXISTS))
}

method f() {
self.e && nqp::p6bool(nqp::stat(nqp::unbox_s($.path), pir::const::STAT_ISREG))
self.e && nqp::p6bool(nqp::stat(nqp::unbox_s($.path), nqp::const::STAT_ISREG))
}

method l() {
Expand All @@ -53,7 +53,7 @@ my role IO::FileTestable {
method s() {
self.e
&& nqp::p6box_i( nqp::stat(nqp::unbox_s($.path),
pir::const::STAT_FILESIZE) );
nqp::const::STAT_FILESIZE) );
}

method w() {
Expand All @@ -69,15 +69,15 @@ my role IO::FileTestable {
}

method modified() {
nqp::p6box_i(nqp::stat(nqp::unbox_s($.path), pir::const::STAT_MODIFYTIME));
nqp::p6box_i(nqp::stat(nqp::unbox_s($.path), nqp::const::STAT_MODIFYTIME));
}

method accessed() {
nqp::p6box_i(nqp::stat(nqp::unbox_s($.path), pir::const::STAT_ACCESSTIME));
nqp::p6box_i(nqp::stat(nqp::unbox_s($.path), nqp::const::STAT_ACCESSTIME));
}

method changed() {
nqp::p6box_i(nqp::stat(nqp::unbox_s($.path), pir::const::STAT_CHANGETIME));
nqp::p6box_i(nqp::stat(nqp::unbox_s($.path), nqp::const::STAT_CHANGETIME));
}
}

Expand Down
2 changes: 1 addition & 1 deletion tools/build/NQP_REVISION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2013.03-8-gebd44e7
2013.03-9-g445f1ac

0 comments on commit 17f5e59

Please sign in to comment.