From e327aa50931b8d081598a47dc8e085a2f52f851f Mon Sep 17 00:00:00 2001 From: Michael Bebenita Date: Wed, 28 Jul 2010 00:40:45 -0700 Subject: [PATCH] Teach task_owned and dom_owned to find their dom via consistent interface. --- src/rt/rust_internal.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/rt/rust_internal.h b/src/rt/rust_internal.h index 529fd3d75b8..bc5835fefac 100644 --- a/src/rt/rust_internal.h +++ b/src/rt/rust_internal.h @@ -95,6 +95,9 @@ template struct dom_owned { + rust_dom *get_dom() const { + return ((T*)this)->dom; + } void operator delete(void *ptr) { ((T *)ptr)->dom->free(ptr); } @@ -104,6 +107,9 @@ template struct task_owned { + rust_dom *get_dom() const { + return ((T *)this)->task->dom; + } void operator delete(void *ptr) { ((T *)ptr)->task->dom->free(ptr); }