Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed most IO::Stat functions #2376

Closed
p6rt opened this issue Feb 26, 2011 · 4 comments
Closed

Fixed most IO::Stat functions #2376

p6rt opened this issue Feb 26, 2011 · 4 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Feb 26, 2011

Migrated from rt.perl.org#84948 (status was 'resolved')

Searchable as RT84948$

@p6rt
Copy link
Author

p6rt commented Feb 26, 2011

From will@worrbase.com

Parrot introduced some changes which broke most of the functions in
IO​::Stat. I fixed them, and added two new functions (isdev, islnk)
that parrot implemented.

This patch was also sent as a pull request on github.

--
-Will Orr

@p6rt
Copy link
Author

p6rt commented Feb 26, 2011

From will@worrbase.com

0001-Fixed-some-stat-bugs.patch
From 57e34fc2d268134f992b72887acdfb72ec81768a Mon Sep 17 00:00:00 2001
From: William Orr <will@worrbase.com>
Date: Fri, 25 Feb 2011 19:23:07 -0500
Subject: [PATCH] Fixed some stat bugs

- added isreg
- added islnk
- fixed all IO::Stat methods with intval > 2
---
 src/core/IO/Stat.pm |   24 ++++++++++++++++--------
 1 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/src/core/IO/Stat.pm b/src/core/IO/Stat.pm
index dba9c86..2578498 100644
--- a/src/core/IO/Stat.pm
+++ b/src/core/IO/Stat.pm
@@ -13,36 +13,44 @@ class IO::Stat {
         ?pir::stat__isi($.path, 2);
     }
 
-    method isdev {
+    method isreg {
         ?pir::stat__isi($.path, 3);
     }
 
+    method isdev {
+        ?pir::stat__isi($.path, 4);
+    }
+
     method createtime {
-        pir::stat__isi($.path, 4);
+        pir::stat__isi($.path, 5);
     }
 
     method accesstime {
-        pir::stat__isi($.path, 5);
+        pir::stat__isi($.path, 6);
     }
 
     method modifytime {
-        pir::stat__isi($.path, 6);
+        pir::stat__isi($.path, 7);
     }
 
     method changetime {
-        pir::stat__isi($.path, 7);
+        pir::stat__isi($.path, 8);
     }
 
     method backuptime {
-        pir::stat__isi($.path, 8);
+        pir::stat__isi($.path, 9);
     }
 
     method uid {
-        pir::stat__isi($.path, 9);
+        pir::stat__isi($.path, 10);
     }
 
     method gid {
-        pir::stat__isi($.path, 10);
+        pir::stat__isi($.path, 11);
+    }
+
+    method islnk {
+        ?pir::stat__isi($.path, 12);
     }
 }
 
-- 
1.7.4.1

@p6rt
Copy link
Author

p6rt commented May 1, 2011

From @moritz

this has been applied quite some time ago, thanks for the patch; I'm
closing the ticket now.

@p6rt
Copy link
Author

p6rt commented May 1, 2011

@moritz - Status changed from 'new' to 'resolved'

@p6rt p6rt closed this as completed May 1, 2011
@p6rt p6rt added the patch label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant