Revert "stdlib: Migrate rust_file_is_dir() over to the C stack, and add a void type" due to build bustage on Windows
This reverts commit 9698ef89a0
.
This commit is contained in:
parent
9698ef89a0
commit
0e5ea4d64f
|
@ -1,10 +1,9 @@
|
||||||
|
|
||||||
import os::getcwd;
|
import os::getcwd;
|
||||||
import util::void;
|
|
||||||
import os_fs;
|
import os_fs;
|
||||||
|
|
||||||
native "c-stack-cdecl" mod rustrt {
|
native "rust" mod rustrt {
|
||||||
fn rust_file_is_dir(unused: *void, path: *u8) -> int;
|
fn rust_file_is_dir(path: str::sbuf) -> int;
|
||||||
}
|
}
|
||||||
|
|
||||||
fn path_sep() -> str { ret str::from_char(os_fs::path_sep); }
|
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 {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn file_is_dir(p: path) -> bool {
|
fn file_is_dir(p: path) -> bool {
|
||||||
ret str::as_buf(p, {
|
ret str::as_buf(p, {|buf| rustrt::rust_file_is_dir(buf) != 0 });
|
||||||
|buf| rustrt::rust_file_is_dir(ptr::null(), buf) != 0
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn list_dir(p: path) -> [str] {
|
fn list_dir(p: path) -> [str] {
|
||||||
|
|
|
@ -17,13 +17,6 @@ pure fn rational_leq(x: rational, y: rational) -> bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
pure fn orb(a: bool, b: bool) -> bool { a || b }
|
pure fn orb(a: bool, b: bool) -> bool { a || b }
|
||||||
|
|
||||||
// An unconstructible type. Currently we're using this for unused parameters
|
|
||||||
// in native functions, but it may be useful for other purposes as well.
|
|
||||||
tag void {
|
|
||||||
void(@void);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Local Variables:
|
// Local Variables:
|
||||||
// mode: rust;
|
// mode: rust;
|
||||||
// fill-column: 78;
|
// fill-column: 78;
|
||||||
|
|
Loading…
Reference in a new issue