diff options
| author | Brian Anderson <banderson@mozilla.com> | 2013-06-21 19:40:00 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2013-06-24 17:07:01 -0700 |
| commit | aa9210d25afb3779e1d95722b73b62a7be6274fe (patch) | |
| tree | d15d99ce3ef4e28d96b5301e79f1d02fc91ef2fd /src/rt/rust_builtin.cpp | |
| parent | 95eb01957bf23922abdf083f677c6c2d6927713a (diff) | |
| download | rust-aa9210d25afb3779e1d95722b73b62a7be6274fe.tar.gz rust-aa9210d25afb3779e1d95722b73b62a7be6274fe.zip | |
std: Rewrite vec_reserve_shared_actual in Rust
Diffstat (limited to 'src/rt/rust_builtin.cpp')
| -rw-r--r-- | src/rt/rust_builtin.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp index f0b68d4a156..9ed389b178a 100644 --- a/src/rt/rust_builtin.cpp +++ b/src/rt/rust_builtin.cpp @@ -68,11 +68,10 @@ rust_env_pairs() { } #endif -extern "C" CDECL void -vec_reserve_shared_actual(type_desc* ty, rust_vec_box** vp, - size_t n_elts) { +extern "C" CDECL void * +rust_local_realloc(rust_opaque_box *ptr, size_t size) { rust_task *task = rust_get_current_task(); - reserve_vec_exact_shared(task, vp, n_elts * ty->size); + return task->boxed.realloc(ptr, size); } // This is completely misnamed. @@ -899,6 +898,11 @@ rust_boxed_region_malloc(boxed_region *region, type_desc *td, size_t size) { return region->malloc(td, size); } +extern "C" CDECL rust_opaque_box* +rust_boxed_region_realloc(boxed_region *region, rust_opaque_box *ptr, size_t size) { + return region->realloc(ptr, size); +} + extern "C" CDECL void rust_boxed_region_free(boxed_region *region, rust_opaque_box *box) { region->free(box); |
