diff options
| author | Brian Anderson <banderson@mozilla.com> | 2011-08-11 16:36:20 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2011-08-12 12:08:26 -0700 |
| commit | 2e7e58812b4b6a295c06f73b72288dcf8cd801cb (patch) | |
| tree | 4ad2ecf7166b6cd7cb867c5344145914d1d2e0f6 /src/rt/rust_builtin.cpp | |
| parent | d6626143cccc0599d2b5ac6e7627708273608063 (diff) | |
| download | rust-2e7e58812b4b6a295c06f73b72288dcf8cd801cb.tar.gz rust-2e7e58812b4b6a295c06f73b72288dcf8cd801cb.zip | |
Remove vec version of str::bytes, rename bytes_ivec to str::bytes
Diffstat (limited to 'src/rt/rust_builtin.cpp')
| -rw-r--r-- | src/rt/rust_builtin.cpp | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp index 7653bc35ee2..2037714aae6 100644 --- a/src/rt/rust_builtin.cpp +++ b/src/rt/rust_builtin.cpp @@ -277,32 +277,6 @@ str_buf(rust_task *task, rust_str *s) return (char const *)&s->data[0]; } -extern "C" CDECL rust_vec* -str_vec(rust_task *task, rust_str *s) -{ - // FIXME: this should just upref s and return it, but we - // accidentally made too much of the language and runtime know - // and care about the difference between str and vec (trailing null); - // eliminate these differences and then rewrite this back to just - // the following: - // - // if (s->ref_count != CONST_REFCOUNT) - // s->ref(); - // return s; - - rust_str *v = - vec_alloc_with_data(task, - s->fill - 1, - s->fill - 1, - 1, - (s->fill - 1) ? (void*)s->data : NULL); - if (!v) { - task->fail(); - return NULL; - } - return v; -} - extern "C" CDECL size_t str_byte_len(rust_task *task, rust_str *s) { |
