diff options
| author | Haitao Li <lihaitao@gmail.com> | 2012-01-16 18:21:01 +0800 |
|---|---|---|
| committer | Haitao Li <lihaitao@gmail.com> | 2012-01-19 02:10:36 +0800 |
| commit | dde41869ce2ef1d66e753fc8b4efc7d917c77875 (patch) | |
| tree | ee9ea278fa981a8188a7d4cdb11201df10a81478 /src/libstd/fs.rs | |
| parent | f03eb96f39dd616d8213cadf337b9d0b0984a687 (diff) | |
| download | rust-dde41869ce2ef1d66e753fc8b4efc7d917c77875.tar.gz rust-dde41869ce2ef1d66e753fc8b4efc7d917c77875.zip | |
Use ctypes in native function declarations
Diffstat (limited to 'src/libstd/fs.rs')
| -rw-r--r-- | src/libstd/fs.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libstd/fs.rs b/src/libstd/fs.rs index 5a4bcbde101..fe06e2a89aa 100644 --- a/src/libstd/fs.rs +++ b/src/libstd/fs.rs @@ -13,8 +13,8 @@ import os_fs; #[abi = "cdecl"] native mod rustrt { - fn rust_path_is_dir(path: str::sbuf) -> int; - fn rust_path_exists(path: str::sbuf) -> int; + fn rust_path_is_dir(path: str::sbuf) -> ctypes::c_int; + fn rust_path_exists(path: str::sbuf) -> ctypes::c_int; } /* @@ -120,7 +120,7 @@ Function: path_is_dir Indicates whether a path represents a directory. */ fn path_is_dir(p: path) -> bool { - ret str::as_buf(p, {|buf| rustrt::rust_path_is_dir(buf) != 0 }); + ret str::as_buf(p, {|buf| rustrt::rust_path_is_dir(buf) != 0i32 }); } /* @@ -129,7 +129,7 @@ Function: path_exists Indicates whether a path exists. */ fn path_exists(p: path) -> bool { - ret str::as_buf(p, {|buf| rustrt::rust_path_exists(buf) != 0 }); + ret str::as_buf(p, {|buf| rustrt::rust_path_exists(buf) != 0i32 }); } /* |
