Support a special const-value refcount, use it for const strings.

This commit is contained in:
Graydon Hoare
2010-11-09 14:15:07 -08:00
parent 3e9be14757
commit 89946609f2
10 changed files with 97 additions and 30 deletions

View File

@@ -424,7 +424,10 @@ upcall_vec_grow(rust_task *task,
task->fail(4);
return NULL;
}
v->deref();
if (v->ref_count != CONST_REFCOUNT)
v->deref();
v = new (mem) rust_vec(dom, alloc, 0, NULL);
*need_copy = 1;
}