Skip to content

Commit 971e58e

Browse files
committed
---
yaml --- r: 5672 b: refs/heads/master c: 0e5ea4d h: refs/heads/master v: v3
1 parent 82629a1 commit 971e58e

File tree

3 files changed

+4
-14
lines changed

3 files changed

+4
-14
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 9698ef89a0c5513b9670f6ec56ea06de5728eb5a
2+
refs/heads/master: 0e5ea4d64f43cfbf91670b3d13ff3be7562d99fd

trunk/src/lib/fs.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11

22
import os::getcwd;
3-
import util::void;
43
import os_fs;
54

6-
native "c-stack-cdecl" mod rustrt {
7-
fn rust_file_is_dir(unused: *void, path: *u8) -> int;
5+
native "rust" mod rustrt {
6+
fn rust_file_is_dir(path: str::sbuf) -> int;
87
}
98

109
fn path_sep() -> str { ret str::from_char(os_fs::path_sep); }
@@ -53,9 +52,7 @@ fn connect_many(paths: [path]) : vec::is_not_empty(paths) -> path {
5352
}
5453

5554
fn file_is_dir(p: path) -> bool {
56-
ret str::as_buf(p, {
57-
|buf| rustrt::rust_file_is_dir(ptr::null(), buf) != 0
58-
});
55+
ret str::as_buf(p, {|buf| rustrt::rust_file_is_dir(buf) != 0 });
5956
}
6057

6158
fn list_dir(p: path) -> [str] {

trunk/src/lib/util.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,6 @@ pure fn rational_leq(x: rational, y: rational) -> bool {
1717
}
1818

1919
pure fn orb(a: bool, b: bool) -> bool { a || b }
20-
21-
// An unconstructible type. Currently we're using this for unused parameters
22-
// in native functions, but it may be useful for other purposes as well.
23-
tag void {
24-
void(@void);
25-
}
26-
2720
// Local Variables:
2821
// mode: rust;
2922
// fill-column: 78;

0 commit comments

Comments
 (0)