import os::getcwd;
import os_fs;
-native "rust" mod rustrt {
+native "c-stack-cdecl" mod rustrt {
fn rust_file_is_dir(path: str::sbuf) -> int;
}
-native "rust" mod rustrt {
+native "c-stack-cdecl" mod rustrt {
fn rust_list_files(&&path: str) -> [str];
fn rust_file_is_dir(&&path: str) -> int;
}
}
extern "C" CDECL rust_vec*
-rust_list_files(rust_vec **path) {
+rust_list_files(rust_str *path) {
rust_task *task = rust_scheduler::get_task();
array_list<rust_str*> strings;
#if defined(__WIN32__)
WIN32_FIND_DATA FindFileData;
- HANDLE hFind = FindFirstFile((char*)(*path)->data, &FindFileData);
+ HANDLE hFind = FindFirstFile((char*)path->data, &FindFileData);
if (hFind != INVALID_HANDLE_VALUE) {
do {
rust_str *str = make_str(task->kernel, FindFileData.cFileName,
FindClose(hFind);
}
#else
- DIR *dirp = opendir((char*)(*path)->data);
+ DIR *dirp = opendir((char*)path->data);
if (dirp) {
struct dirent *dp;
while ((dp = readdir(dirp))) {