Remove str_from_vec runtime function

This commit is contained in:
Brian Anderson 2011-08-11 17:15:34 -07:00
parent 740196987e
commit 878fbac278
3 changed files with 1 additions and 20 deletions

View file

@ -304,23 +304,6 @@ str_from_ivec(rust_task *task, rust_ivec *v)
return st;
}
extern "C" CDECL rust_str *
str_from_vec(rust_task *task, rust_vec *v)
{
rust_str *st =
vec_alloc_with_data(task,
v->fill + 1, // +1 to fit at least '\0'
v->fill,
1,
v->fill ? (void*)v->data : NULL);
if (!st) {
task->fail();
return NULL;
}
st->data[st->fill++] = '\0';
return st;
}
extern "C" CDECL rust_str *
str_from_cstr(rust_task *task, char *sbuf)
{