Make std::arena run destructors. Closes #2831.

This commit is contained in:
Michael Sullivan
2012-08-21 15:32:30 -07:00
parent 98d0aae9a1
commit 5f32e18011
4 changed files with 174 additions and 22 deletions

View File

@@ -949,6 +949,15 @@ rust_task_deref(rust_task *task) {
task->deref();
}
// Must call on rust stack.
extern "C" CDECL void
rust_call_tydesc_glue(void *root, size_t *tydesc, size_t glue_index) {
void (*glue_fn)(void *, void *, void *, void *) =
(void (*)(void *, void *, void *, void *))tydesc[glue_index];
if (glue_fn)
glue_fn(0, 0, 0, root);
}
//
// Local Variables:
// mode: C++