summary refs log tree commit diff
path: root/src/rt/rust_box_annihilator.cpp
diff options
context:
space:
mode:
authorTim Chevalier <chevalier@alum.wellesley.edu>2012-06-24 15:09:57 -0700
committerTim Chevalier <chevalier@alum.wellesley.edu>2012-06-24 15:09:57 -0700
commit487cbf8e906f73589df9501004abeb570b24f121 (patch)
tree7203f78ddc8930c8627966e2d292d7237c1a4a6d /src/rt/rust_box_annihilator.cpp
parent60a748a1d8e9631df9b04235881917c0a80c9e03 (diff)
downloadrust-487cbf8e906f73589df9501004abeb570b24f121.tar.gz
rust-487cbf8e906f73589df9501004abeb570b24f121.zip
Remove resources
Also fixed shapes for classes with dtors, as well as handling
offsets for classes with dtors correctly in take glue.

Closes #2485
Diffstat (limited to 'src/rt/rust_box_annihilator.cpp')
-rw-r--r--src/rt/rust_box_annihilator.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/rt/rust_box_annihilator.cpp b/src/rt/rust_box_annihilator.cpp
index 20058a8a9db..1ac0ac78ca7 100644
--- a/src/rt/rust_box_annihilator.cpp
+++ b/src/rt/rust_box_annihilator.cpp
@@ -138,15 +138,14 @@ class annihilator : public shape::data<annihilator,shape::ptr> {
         void *data;
     };
 
-    typedef void (*dtor)(void **retptr, void *env, void *dptr);
+    typedef void (*dtor)(void **retptr, void *dptr);
 
     static void run_dtor(run_dtor_args *args) {
         dtor f = (dtor)args->dtor;
-        f(NULL, args->dtor->env, args->data);
+        f(NULL, args->data);
     }
 
-    void walk_res2(const shape::rust_fn *dtor, const uint8_t *end_sp,
-                   bool live) {
+    void walk_res2(const shape::rust_fn *dtor, const uint8_t *end_sp) {
         void *data = (void*)(uintptr_t)dp;
         // Switch back to the Rust stack to run the destructor
         run_dtor_args args = {dtor, data};