Skip to content

Commit ecd4318

Browse files
committed
rt: Fix rust_list_files for new vecs
1 parent 54d42c4 commit ecd4318

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/rt/rust_builtin.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ debug_get_stk_seg() {
367367
return task->stk;
368368
}
369369

370-
extern "C" CDECL rust_vec*
370+
extern "C" CDECL rust_vec_box*
371371
rust_list_files(rust_str *path) {
372372
rust_task *task = rust_get_current_task();
373373
array_list<rust_str*> strings;
@@ -397,12 +397,12 @@ rust_list_files(rust_str *path) {
397397
}
398398
#endif
399399

400-
rust_vec *vec = (rust_vec *)
401-
task->kernel->malloc(vec_size<rust_vec*>(strings.size()),
400+
rust_vec_box *vec = (rust_vec_box *)
401+
task->kernel->malloc(vec_size<rust_vec_box*>(strings.size()),
402402
"list_files_vec");
403403
size_t alloc_sz = sizeof(rust_vec*) * strings.size();
404-
vec->fill = vec->alloc = alloc_sz;
405-
memcpy(&vec->data[0], strings.data(), alloc_sz);
404+
vec->body.fill = vec->body.alloc = alloc_sz;
405+
memcpy(&vec->body.data[0], strings.data(), alloc_sz);
406406
return vec;
407407
}
408408

0 commit comments

Comments
 (0)