diff options
| author | Michael Sullivan <sully@msully.net> | 2012-08-21 15:32:30 -0700 |
|---|---|---|
| committer | Michael Sullivan <sully@msully.net> | 2012-08-21 17:03:00 -0700 |
| commit | 5f32e180118b8163821e3276d4234f4d7e2f1eeb (patch) | |
| tree | 91b697ad59c5b710b622eeb7136c4feb5f2e14eb /src/rt/rust_builtin.cpp | |
| parent | 98d0aae9a1a427e299f281917ad3f387dbd675f2 (diff) | |
| download | rust-5f32e180118b8163821e3276d4234f4d7e2f1eeb.tar.gz rust-5f32e180118b8163821e3276d4234f4d7e2f1eeb.zip | |
Make std::arena run destructors. Closes #2831.
Diffstat (limited to 'src/rt/rust_builtin.cpp')
| -rw-r--r-- | src/rt/rust_builtin.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp index 8fd8bdc7c45..cabc086b64f 100644 --- a/src/rt/rust_builtin.cpp +++ b/src/rt/rust_builtin.cpp @@ -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++ |
