diff options
| author | Brian Anderson <banderson@mozilla.com> | 2011-08-18 14:43:17 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2011-08-18 14:43:17 -0700 |
| commit | 0467fa6a009e620a1a7486938f5ffd25730d4df5 (patch) | |
| tree | 7f4a5af99abec600d1d6d87384ea1e1f8928bcc8 /src/rt/rust_builtin.cpp | |
| parent | 1739200b02d0714c6caaf47d7a09cab037a40682 (diff) | |
| download | rust-0467fa6a009e620a1a7486938f5ffd25730d4df5.tar.gz rust-0467fa6a009e620a1a7486938f5ffd25730d4df5.zip | |
Rename rust_vec to rust_evec
Diffstat (limited to 'src/rt/rust_builtin.cpp')
| -rw-r--r-- | src/rt/rust_builtin.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp index aa00de961b8..ac4491f1588 100644 --- a/src/rt/rust_builtin.cpp +++ b/src/rt/rust_builtin.cpp @@ -127,17 +127,17 @@ unsupervise(rust_task *task) { } /* Helper for str_alloc and str_from_vec. Returns NULL as failure. */ -static rust_vec* +static rust_evec* vec_alloc_with_data(rust_task *task, size_t n_elts, size_t fill, size_t elt_size, void *d) { - size_t alloc = next_power_of_two(sizeof(rust_vec) + (n_elts * elt_size)); - void *mem = task->malloc(alloc, "rust_vec (with data)"); + size_t alloc = next_power_of_two(sizeof(rust_evec) + (n_elts * elt_size)); + void *mem = task->malloc(alloc, "rust_evec (with data)"); if (!mem) return NULL; - return new (mem) rust_vec(alloc, fill * elt_size, (uint8_t*)d); + return new (mem) rust_evec(alloc, fill * elt_size, (uint8_t*)d); } extern "C" CDECL rust_str* @@ -158,7 +158,7 @@ extern "C" CDECL rust_str* str_push_byte(rust_task* task, rust_str* v, size_t byte) { size_t fill = v->fill; - size_t alloc = next_power_of_two(sizeof(rust_vec) + fill + 1); + size_t alloc = next_power_of_two(sizeof(rust_evec) + fill + 1); if (v->ref_count > 1 || v->alloc < alloc) { v = vec_alloc_with_data(task, fill + 1, fill, 1, (void*)&v->data[0]); if (!v) { |
