Add a rust_str typedef to the runtime. Issue #855

This commit is contained in:
Brian Anderson
2011-09-02 17:00:40 -07:00
parent 01b254b411
commit 1b67d211b4
3 changed files with 14 additions and 12 deletions

View File

@@ -188,11 +188,13 @@ inline void reserve_vec(rust_task* task, rust_vec** vpp, size_t size) {
}
}
inline rust_vec *
typedef rust_vec rust_str;
inline rust_str *
make_str(rust_kernel* kernel, char* c, size_t strlen, const char* name) {
size_t str_fill = strlen + 1;
size_t str_alloc = str_fill;
rust_vec *str = (rust_vec *)
rust_str *str = (rust_str *)
kernel->malloc(vec_size<char>(str_fill), name);
str->fill = str_fill;
str->alloc = str_alloc;